[Bug bootstrap/50758] [4.7 Regression] Bootstrap fails at stage 2 on x86_64-apple-darwin10: error: variable 'token_no' set but not used
dodji at seketeli dot org
gcc-bugzilla@gcc.gnu.org
Mon Oct 17 15:56:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50758
--- Comment #5 from dodji at seketeli dot org <dodji at seketeli dot org> 2011-10-17 15:56:05 UTC ---
"dominiq at lps dot ens.fr" <gcc-bugzilla@gcc.gnu.org> a écrit:
> I guess that revision 180090 is a similar fix that should work (I'll
> have the answer in a couple hours;-).
OK, thanks.
> Last question: is the warning bogus or not? If no, why? If yes, I'll
> open a new PR.
The warning is not bogus when you are compiling with --disable-checking
or when your GCC_VERSION is < 2007. This is because the way
linemap_assert is defined:
/* Assertion macro to be used in line-map code. */
#define linemap_assert(EXPR) \
do { \
if (! (EXPR)) \
abort (); \
} while (0)
/* Assert that MAP encodes locations of tokens that are not part of
the replacement-list of a macro expansion. */
#define linemap_check_ordinary(LINE_MAP) __extension__ \
({linemap_assert (!linemap_macro_expansion_map_p (LINE_MAP)); \
(LINE_MAP);})
#else
#define linemap_assert(EXPR)
#define linemap_check_ordinary(LINE_MAP) (LINE_MAP)
#endif
In those cases token_no is not used. Hence the fix committed to
revision 180090.
Sorry for the inconvenience.
More information about the Gcc-bugs
mailing list