Mail Archives: cygwin-apps/2002/02/01/16:06:11
Recent changes to attribute handling in GCC fix some *really important*
problems with handling of attributes in C++, particulary with dllimport of
2002-01-31 Jason Merrill <jason AT redhat DOT com>
* decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
* semantics.c (finish_class_definition): Adjust.
Allow attributes in parms and casts.
* parse.y (named_parm): Don't strip attrs.
(declmods): Remove 'attributes' production.
(nonempty_cv_qualifiers): Accept attributes.
(ATTRIBUTE): Give precedence.
* decl.c (groktypename): Handle attributes.
However they also cause parse errors at four places in the w32api
headers (but only with C++);
rpcdce.h:362:DECLSPEC_NORETURN void RPC_ENTRY
winbase.h:1059:DECLSPEC_NORETURN void WINAPI ExitProcess(UINT);
winbase.h:1060:DECLSPEC_NORETURN void WINAPI ExitThread(DWORD);
winbase.h:1095:DECLSPEC_NORETURN void WINAPI
The parse errors can be fixed quite simply by putting the
__attribute__((noreturn)) at the end of the prototype rather than the
beginning in the w32api headers.
I am not going to report this as a bug to GCC yet since the local fix is so
easy. Placing the attribute after the function is the logical (sensu GCC)
thing to do anyway.
Just a heads up for others testing GCC.
http://my.yahoo.com.au - My Yahoo!
- It's My Yahoo! Get your own!
- Raw text -