This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: This is a bug ?
- To: Antonio Mendes de Oliveira Neto <anmendes at splicenet dot com dot br>
- Subject: Re: This is a bug ?
- From: Mumit Khan <khan at xraylith dot wisc dot EDU>
- Date: Sun, 06 Dec 1998 19:09:55 -0600
- cc: egcs at cygnus dot com
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