On 04/12/17 07:46, Bill Fenner wrote:
> On Tue, Apr 11, 2017 at 11:51 AM, Magnus Fromreide <ma...@lysator.liu.se
> <mailto:ma...@lysator.liu.se>> wrote:
>
>     On Tue, Apr 11, 2017 at 10:27:42AM -0500, Bill Fenner wrote:
>     > Now I get a fair number of
>     >
>     > cc1: warning: unrecognized command line option 
> "-Wno-implicit-fallthrough"
>     >
>     > Would it be better to try __attribute__((fallthrough))?  Or, only add 
> the
>     > -W flag if the compiler supports it?
>
>     Maybe add /*FALLTHROUGH*/ lint comments?
>     The warning code looks for them unless you ask it not to.
>
>
> https://developers.redhat.com/blog/2017/03/10/wimplicit-fallthrough-in-gcc-7/
> lists the sets of comments that are accepted.  Bart's initial commit says:
> "Apparently gcc 7 does not recognize the fallthrough annotations in the
> Net-SNMP source code".  I wonder if it might be better to try
> -Wimplicit-fallthrough=2 instead.
>
> This has the advantage that the older compiler knows it doesn't support it:
> checking whether the compiler supports -Wimplicit-fallthrough=2... no
> and has a more generous regexp for matching fallthrough comments, so
> may still silence the warnings.  Bart, are you willing to give this a try?
> (I don't have gcc7 easily available to test with.)

Hello Bill,

Have you noticed that Niels has already checked in a fix ("Re-enable 
implicit-fallthrugh warning for gcc7")?

Bart.



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to