This is the mail archive of the egcs-bugs@egcs.cygnus.com mailing list for the EGCS project.


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

Re: typedef in preprocessor macros


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


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