This is the mail archive of the gcc-patches@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: Implement -Wswitch-fallthrough


> After I'd completed the warning, I kicked off a bootstrap so as to add
> various gcc_fallthrough calls.  There were a good amount of them, as
> expected.  I also grepped various FALLTHRU/Falls through/...fall
> thru.../... comments in config/ and added gcc_fallthroughs to make it
> easier for people.  Wherever I wasn't sure that the gcc_fallthrough was
> appropriate, I added an 'XXX' comment.  This must not be relied upon as I
> don't know most of the compiler code.  The same goes for relevant libraries
> where I introduced various gomp_fallthrough macros conditional on __GNUC__
> (I'd tried to use a configure check but then decided I won't put up with
> all the vagaries of autoconf).

Do we really want to clutter up the entire tree like that?  The result is 
particularly ugly IMO.  Just add -Wno-switch-fallthrough somewhere I'd say.

-- 
Eric Botcazou


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