DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Complying with standard C

Single compilation compatibility

When two declarations in the same scope describe the same object or function, the two declarations must specify compatible types. These two types are then combined into a single composite type that is compatible with the first two. More about composite types later.

The compatible types are defined recursively. At the bottom are type specifier keywords. (These are the rules that say that unsigned short is the same as unsigned short int, and that a type without type specifiers is the same as one with int.) All other types are compatible only if the types from which they are derived are compatible. For example, two qualified types are compatible if the qualifiers (const and volatile) are identical and the unqualified base types are compatible.


Next topic: Compatible pointer types
Previous topic: Separate compilation compatibility

© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005