bison-patches
[Top][All Lists]
Advanced

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

Re: #if versus #ifdef in bison.simple


From: Marc Autret
Subject: Re: #if versus #ifdef in bison.simple
Date: 03 Dec 2001 15:20:17 -0500
User-agent: Gnus/5.0807 (Gnus v5.8.7) Emacs/20.7

Paul Eggert <address@hidden> writes:


> I like that style for code that I maintain, but bison.simple needs to
> follow a stricter style, as it is used by people who use a variety of
> styles.  A few people like to compile with gcc -Wundef, and that will
> cause `#if FOO' to generate a diagnostic if FOO is not defined.
> 
> Also, for the particular case of YYERROR_VERBOSE, the manual states
> "It doesn't matter what definition you use for YYERROR_VERBOSE, just
> whether you define it."  So we couldn't use `#if YYERROR_VERBOSE' even
> if we didn't care about gcc -Wundef.
> 

That's true for bison 1.30. For the trunk, CPP macros in bison.simple
become more and more stricly internal. The managing of the values of
these macros will be only made by Bison by options in the .y file.
cf %error-verbose

Moreover, the documentation must be updated on the trunk!

-- 
Marc Autret



reply via email to

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