This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RE: PR cpp/33907 Empty macro definitions not considered equal
- From: "Dave Korn" <dave dot korn at artimi dot com>
- To: 'Manuel López-Ibáñez' <lopezibanez at gmail dot com>, "'GCC Patches'" <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 28 Nov 2007 17:16:36 -0000
- Subject: RE: PR cpp/33907 Empty macro definitions not considered equal
- References: <6c33472e0711280858w6a310f76w410f04a1631294d7@mail.gmail.com>
On 28 November 2007 16:59, Manuel López-Ibáñez wrote:
> Suggestions on how to improve the comment (in particular where in the
> standard this is actually mentioned) are welcome.
For C, it's 6.10.3 that imposes the requirement that the definitions must
have "the same number and spelling of parameters", in addition to the same
replacement lists.
+ /* Since this diagnostic is mandated by the standard, with -pedantic
+ we diagnose different parameters spellings even if the macro
+ expansion has no tokens. */
Already seems fairly clear to me, but maybe
"The standard (6.10.3) mandates this diagnostic when there is a mismatch in
the number or spelling of parameters, even in the case of an empty macro that
does not reference its parameters; we restrict the warning to -pedantic for
that particular case."
?
cheers,
DaveK
--
Can't think of a witty .sigline today....