bug-bison
[Top][All Lists]
Advanced

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

__attribute__((__unused__)) problem


From: victor khomenko
Subject: __attribute__((__unused__)) problem
Date: Fri, 5 Apr 2013 12:00:33 +0000

I've recently updated to bison-2.7 and my code stopped compiling. The reason is 
__attribute__((__unused__)) applied to yy_location_print_ - it fails to compile 
in Visual Studio (the *.y file was compiled into *.cpp under Windows using 
bison-2.7 coming with CYGWIN). The problematic code emitted by bison is as 
follows (note that the attribute is not guarded by the _MSC_VER macro):

__attribute__((__unused__))
#if (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
static unsigned
yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
#else
static unsigned
yy_location_print_ (yyo, yylocp)
    FILE *yyo;
    YYLTYPE const * const yylocp;
#endif
{
...
}


reply via email to

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