PR cpp/33907 Empty macro definitions not considered equal

Dave Korn dave.korn@artimi.com
Wed Nov 28 19:38:00 GMT 2007


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....



More information about the Gcc-patches mailing list