This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Function-like macro definitions
- To: Neil Booth <NeilB at earthling dot net>
- Subject: Re: Function-like macro definitions
- From: Branko Čibej <branko dot cibej at hermes dot si>
- Date: Fri, 19 May 2000 13:28:57 +0200
- CC: gcc at gcc dot gnu dot org, Zack Weinberg <zack at wolery dot cumb dot org>
- Organization: HERMES SoftLab
- References: <E12skGk-0007Fy-00@monkey.rosenet.ne.jp>
Neil Booth wrote:
> Also, I'm considering reducing the status of redefinitions like
>
> #define F(X) X
> #define F(Y) Y
>
> where the only difference is the spelling of the parameters, from hard
> error to pedantic warning.
For C++ (if my reading of the standard is incorrect), the example
above is ill-formed and requires a diagnostic; so, although it can be
a warning, it shouldn't require -pedantic (in conforming mode, that is).
I don't know about C, though.
Brane
--
Branko Čibej <branko.cibej@hermes.si>
HERMES SoftLab, Litijska 51, 1000 Ljubljana, Slovenia
voice: (+386 1) 586 53 49 fax: (+386 1) 586 52 70