On Sun, Mar 26, 2017 at 06:45:07PM -0700, Jerry DeLisle wrote: > On 03/26/2017 11:45 AM, Steve Kargl wrote: > > On Sun, Mar 26, 2017 at 11:27:59AM -0700, Jerry DeLisle wrote: > >> > >> +#pragma GCC diagnostic push > >> +#pragma GCC diagnostic ignored "-Wimplicit-fallthrough" > > > > IMNSHO, the correct fix is to complain loudly to whomever > > added -Wimplicit-fallthrough to compiler options. It should > > be removed (especially if is has been added to -Wall). > > > > You can also probably add -Wno-implicit-fallthrough to > > libgfortran/configure.ac at > > > > # Add -Wall -fno-repack-arrays -fno-underscoring if we are using GCC. > > if test "x$GCC" = "xyes"; then > > AM_FCFLAGS="-I . -Wall -Werror -fimplicit-none -fno-repack-arrays > > -fno-underscoring" > > > > Problem I have is I don't know who to complain to. I think there is a bit of a > glass wall going on here anyway, so what would be the point of complaining if > the retrievers of the message all have the ON-OFF switch in the OFF position. > (After all, I do not have a PHD, I am not a computer science graduate, why > bother looking down ones nose at a low life such as myself, OMG its an > engineer, > what the hell does he know.) > > Maybe these warnings are being turned on as a matter of policy, but truth is, > when I build 50 times a day, the warnings flying by are masking the errors or > other warnings that may be important. For example, I inadvertently passed a > ptr > to a function rather than the *ptr. > > The warning that ensued flew by mixed in with all the other crap warnings and > I > did not see it. That cost me wasted cycle time (remember, I am not an expert > and > should not be expected to see such things. Hell, for that matter I should not > even be doing any of this work. :) >
This option is clearly enforceing someone's preferred markup of adding a comment to explicitly note a fall through. Candidate individual to complain to 2016-09-26 Marek Polacek <[email protected]> PR c/7652 * common.opt (Wimplicit-fallthrough): New option. * doc/extend.texi: Document statement attributes and the fallthrough attribute. * doc/invoke.texi: Document -Wimplicit-fallthrough. * gimple.h (gimple_call_internal_p): New function. * gimplify.c (struct gimplify_ctx): Add in_switch_expr. (struct label_entry): New struct. (find_label_entry): New function. (case_label_p): New function. (collect_fallthrough_labels): New function. (last_stmt_in_scope): New function. (should_warn_for_implicit_fallthrough): New function. (warn_implicit_fallthrough_r): New function. (maybe_warn_implicit_fallthrough): New function. (expand_FALLTHROUGH_r): New function. (expand_FALLTHROUGH): New function. (gimplify_switch_expr): Call maybe_warn_implicit_fallthrough and expand_FALLTHROUGH for the innermost GIMPLE_SWITCH. (gimplify_label_expr): New function. (gimplify_case_label_expr): Set location. (gimplify_expr): Call gimplify_label_expr. * internal-fn.c (expand_FALLTHROUGH): New function. * internal-fn.def (FALLTHROUGH): New internal function. * langhooks.c (lang_GNU_OBJC): New function. * langhooks.h (lang_GNU_OBJC): Declare. * system.h (gcc_fallthrough): Define. * tree-core.h: Add FALLTHROUGH_LABEL_P comment. * tree.h (FALLTHROUGH_LABEL_P): Define. If he added a new option affecting libgfortran, then he should fix up libgfortran. -- Steve 20161221 https://www.youtube.com/watch?v=IbCHE-hONow
