Re: [PATCH v3] cpp/c: Add -Wexpansion-to-defined

2016-11-22 Thread Joseph Myers
On Tue, 22 Nov 2016, Paolo Bonzini wrote: > > It's not obvious to me whether this belongs in -Wextra. After all, this > > is a perfectly reasonable and useful GNU C feature, or at least some cases > > of it are (like "#define FOO (BAR || defined something)"). Is the > > argument that there are

Re: [PATCH v3] cpp/c: Add -Wexpansion-to-defined

2016-11-21 Thread Paolo Bonzini
> It's not obvious to me whether this belongs in -Wextra. After all, this > is a perfectly reasonable and useful GNU C feature, or at least some cases > of it are (like "#define FOO (BAR || defined something)"). Is the > argument that there are too many details of it that differ between >

Re: [PATCH v3] cpp/c: Add -Wexpansion-to-defined

2016-11-21 Thread Joseph Myers
It's not obvious to me whether this belongs in -Wextra. After all, this is a perfectly reasonable and useful GNU C feature, or at least some cases of it are (like "#define FOO (BAR || defined something)"). Is the argument that there are too many details of it that differ between

Re: [PATCH v3] cpp/c: Add -Wexpansion-to-defined

2016-11-21 Thread Paolo Bonzini
On 10/08/2016 15:53, Paolo Bonzini wrote: > From: Paolo Bonzini > > clang recently added a new warning -Wexpansion-to-defined, which > warns when `defined' is used outside a #if expression (including the > case of a macro that is then used in a #if expression). > > While I

[PATCH v3] cpp/c: Add -Wexpansion-to-defined

2016-08-10 Thread Paolo Bonzini
From: Paolo Bonzini clang recently added a new warning -Wexpansion-to-defined, which warns when `defined' is used outside a #if expression (including the case of a macro that is then used in a #if expression). While I disagree with their inclusion of the warning to -Wall, I