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]

Re: This is a bug ?


Antonio Mendes de Oliveira Neto <anmendes@splicenet.com.br> writes:
> Building a common header for C and C++ noticed that a line as this:
> 
> void * __attribute__((stdcall)) func1(void);
> 
> It is compiled perfectly in C, but it generates the message "parse error
> before `__attribute__'" in C++.
> Moving for:
> 
> __attribute__((stdcall)) void * func1(void);
> 
> It is compiled in C++ without problems.
> 
> This is a bug or would the second declaration be the correct?
> 

fyi, chances of getting a response increases dramatically with better 
subject lines than the vague ``This is a bug ?'' ;-)

What egcs snapshot/release are you working with?

This is a bug in C++ parser in egcs releases so far, but I believe Jason
has made the changes in the development snapshots to make this work. 

My patchset for egcs-1.x include Alastair Houghton's original patch
that groks this just fine. This patch is in the Cygwin b20 release 
as well. See 
  
 ftp://ftp.xraylith.wisc.edu/pub/khan/gnu-win32/cygwin32/egcs-1.1/ \
					      patches/broken-down/

and look for the egcs-1.1-c++-attribute.diff.

Regards,
Mumit


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]