Reputation: 577
The Constraints portion of Section 6.3.2.2 of the ANSI C Standard includes the phrase:
Each argument shall have a type such that its value may be assigned to an object with the unqualified version of the type of its corresponding parameter.
Then, What the term 'unqualified version of type' means?
Upvotes: 4
Views: 1108
Reputation: 399863
The C99 draft contains the following language, about the use of the word "qualified":
Any type so far mentioned is an unqualified type. Each unqualified type has several qualified versions of its type, corresponding to the combinations of one, two, or all three of the
const
,volatile
, andrestrict
qualifiers.The qualified or unqualified versions of a type are distinct types that belong to the same type category and have the same representation and alignment requirements.
So your quote says that an argument having a const int
must match a value of type int
, and so on.
Upvotes: 5
Reputation: 409196
Without bothering to check the specification, I would venture a guess that it has to do with e.g. const
or volatile
keywords.
For example, if you have an argument of type const int
, you should be able to assign it to a variable of type int
(without the const
qualifier).
Upvotes: 3