* w32api, DECLSPEC_NORETURN , and GCC-3.x
@ 2002-02-01 12:59 Danny Smith
0 siblings, 0 replies; only message in thread
From: Danny Smith @ 2002-02-01 12:59 UTC (permalink / raw)
To: cygwin-apps, mingw-dvlpr
Recent changes to attribute handling in GCC fix some *really important*
problems with handling of attributes in C++, particulary with dllimport of
class definitions.
cp/Changelog
2002-01-31 Jason Merrill <jason@redhat.com>
PR c++/3395
* decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
not TREE_TYPE.
* 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.
(grokparms): Likewise.
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
RpcRaiseException(RPC_STATUS);
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
FreeLibraryAndExitThread(HMODULE,DWORD);
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.
Danny
http://my.yahoo.com.au - My Yahoo!
- It's My Yahoo! Get your own!
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-02-01 20:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-01 12:59 w32api, DECLSPEC_NORETURN , and GCC-3.x Danny Smith
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).