This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
A typedef declaration which adds semantic attributes to a non-class
type is valid, but again creates an entirely new type.
do anything that would require either type_info or a mangled name for "Q", including using it as an argument to typeid, thowing an exception of a type involving "Q", or declaring a template to take a parameter of a type involving "Q". (We could relax some of these restrictions in future, if we add mangling support for attributes.)
Declaring a function which takes a 'Q' also requires the mangled name of 'Q'.
where T is some invented type name different from all others in the program.
For example given:
__attribute__((packed)) S v;
the type of "&v" is "__attribute__((packed)) S *", and cannot be passed to a function expecting an "S*", but can of course be passed to a function expecting an "__attribute__((packed)) S *", or a typedef for such a type.
... except that there can't be any such functions. You could assign it to another variable of the same type, or a field of a class with that type.
-- Mark Mitchell CodeSourcery mark@codesourcery.com (650) 331-3385 x713
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |