bug-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bison-1.875: g++ and __attribute__ line


From: Nelson H. F. Beebe
Subject: Re: bison-1.875: g++ and __attribute__ line
Date: Sat, 4 Jan 2003 07:14:12 -0700 (MST)

Paul Eggert responds to my report about the problematic
__attribute__((__unused__)) code in bison output:

>> ...
>> Perhaps it's buggy in older GCC compilers, though.  Does it fix things
>> if you change
>>
>> #if defined (__GNUC_MINOR__) && 2093 <= (__GNUC__ * 1000 +
>> __GNUC_MINOR__)
>>
>> to
>>
>> #if defined (__GNUC_MINOR__) && 3002 <= (__GNUC__ * 1000 +
>> __GNUC_MINOR__)
>>
>> in data/yacc.c?
>>
>> ...

No, it is not an issue of the gcc version; I have 3.2.1 on several
systems, and making that change made no difference: without a
semicolon after __attribute__((__unused__)), there is a fatal parse
error, and with a semicolon, there is a "warning: empty declaration"
message.

g++-2.95.3 gets the __attribute__((__unused__)) too, and behaves
exactly like g++-3.2.1 with respect to the presence or absence of the
semicolon.

-------------------------------------------------------------------------------
- Nelson H. F. Beebe                    Tel: +1 801 581 5254                  -
- Center for Scientific Computing       FAX: +1 801 581 4148                  -
- University of Utah                    Internet e-mail: address@hidden  -
- Department of Mathematics, 110 LCB        address@hidden  address@hidden -
- 155 S 1400 E RM 233                       address@hidden                    -
- Salt Lake City, UT 84112-0090, USA    URL: http://www.math.utah.edu/~beebe  -
-------------------------------------------------------------------------------




reply via email to

[Prev in Thread] Current Thread [Next in Thread]