ftp.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-apps/2002/02/01/16:06:11

Mailing-List: contact cygwin-apps-help AT cygwin DOT com; run by ezmlm
Sender: cygwin-apps-owner AT cygwin DOT com
List-Subscribe: <mailto:cygwin-apps-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-apps/>
List-Post: <mailto:cygwin-apps AT cygwin DOT com>
List-Help: <mailto:cygwin-apps-help AT cygwin DOT com>, <http://sources.redhat.com/lists.html#faqs>
Delivered-To: mailing list cygwin-apps AT cygwin DOT com
Message-ID: <20020201205943.16087.qmail@web14508.mail.yahoo.com>
Date: Sat, 2 Feb 2002 07:59:43 +1100 (EST)
From: =?iso-8859-1?q?Danny=20Smith?= <danny_r_smith_2001 AT yahoo DOT co DOT nz>
Subject: w32api, DECLSPEC_NORETURN , and GCC-3.x
To: cygwin-apps <cygwin-apps AT cygwin DOT com>,
mingw-dvlpr <mingw-dvlpr AT lists DOT sourceforge DOT net>
MIME-Version: 1.0

 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 AT redhat DOT 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!

- Raw text -


  webmaster     delorie software   privacy  
  Copyright 2019   by DJ Delorie     Updated Jul 2019