bug-bison
[Top][All Lists]
Advanced

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

RE: __attribute__((__unused__)) problem


From: victor khomenko
Subject: RE: __attribute__((__unused__)) problem
Date: Mon, 8 Apr 2013 17:30:01 +0000

Dear Akim,

The error is gone, but the following warning has appeared instead (the code 
emitted by bison is below):

warning C4505: 'yy_location_print_' : unreferenced local function has been 
removed

Also, note the bizarre test

# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL

Regards,
Victor.

--------------

#ifndef YY_LOCATION_PRINT
# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL

/* Print *YYLOCP on YYO.  Private, do not rely on its existence. */

__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
{
...
 }

#  define YY_LOCATION_PRINT(File, Loc)          \
  yy_location_print_ (File, &(Loc))

# else
#  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
# endif
#endif



reply via email to

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