This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: a warning to implement



> Please, note that I'm not saying that GCC should not have an option to
> trigger the proposed warning. I'm saying that that shouldn't be on by
> default in -Wall.

Then noone will have it on (because it is such a rare case they won't
realize they might need it).

Why can't these rare and hypothetical people with a use for 'T x = x;'
use '-Wall -Wno-warn-self-initialization' ?

It seems to me if a warning is:

1) avoidable via replacement with equivalent construct
2) generates no warnings on >90% (or >99%) of code

it belongs in -Wall.  Cater to the majority, not the minority.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]