[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bison-2.1 compilation warnings
From: |
Paul Eggert |
Subject: |
Re: bison-2.1 compilation warnings |
Date: |
Thu, 11 May 2006 00:25:54 -0700 |
User-agent: |
Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux) |
Bruno Haible <address@hidden> writes:
> I think it's actually not valid C to invoke a macro without arguments that
> is defined as a macro with 1 argument.
You're correct for C89. For C99 it is valid, since C99 macro calls
can have empty arguments. (This is pretty weird, but that's what the
committee decided.)
I vaguely recall mentioning this to W.L. Estes (the flex maintainer, I
guess) a while ago, and he responded that he didn't care about
generating code for pre-C99 compilers. A bit extreme, in my opinion.
The flex incompatibility remains unfixed in flex 2.5.33.
This problem has been worked around in Bison CVS, with the following
patch, so it should be fixed when Bison 2.2 comes out.
http://lists.gnu.org/archive/html/bison-patches/2005-10/msg00037.html
(look for the changes to scan-gram.l and scan-skel.l).