This is the mail archive of the
egcs-bugs@egcs.cygnus.com
mailing list for the EGCS project.
Re: typedef in preprocessor macros
- To: "Guido Flohr" <gufl0000@stud.uni-sb.de>
- Subject: Re: typedef in preprocessor macros
- From: Alexandre Oliva <oliva@dcc.unicamp.br>
- Date: 02 Jul 1999 01:48:45 -0300
- Cc: egcs-bugs@egcs.cygnus.com
- References: <19990702021722.B920@zowee.rz.uni-sb.de>
On Jul 1, 1999, "Guido Flohr" <gufl0000@stud.uni-sb.de> wrote:
> ({typedef _ta = (a), _tb =(b); \
> The above mentioned egcs -Wall will compile about "type defaults to `int'
> in declaration of _ta" (and the same for `_tb').
> Who is wrong? The docs or the compiler?
If you get this in C, it's the compiler, but I don't get any such
message with egcs 1.1.2 nor with the upcoming gcc 2.95. If it's with
C++, the error message is acceptable, since not all C extensions are
supported in C++.
An alternative that works with C++ is:
__typeof__(a) _a = (a); __typeof__(b) _b = (b);
--
Alexandre Oliva http://www.dcc.unicamp.br/~oliva IC-Unicamp, Bra[sz]il
{oliva,Alexandre.Oliva}@dcc.unicamp.br aoliva@{acm.org,computer.org}
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
*** E-mail about software projects will be forwarded to mailing lists