[PATCH][RFC] Instrument function exit with __builtin_unreachable in C++.

Jakub Jelinek jakub@redhat.com
Mon Nov 6 17:41:00 GMT 2017


On Mon, Nov 06, 2017 at 06:23:11PM +0100, Eric Botcazou wrote:
> > Thank you for review, done that.
> 
> This has enabled -Wreturn-type for Ada, what we don't want since the warning 
> is outsmarted by the language, so I have applied this.
> 
> 
> 2017-11-06  Eric Botcazou  <ebotcazou@adacore.com>
> 
> 	* gcc-interface/misc.c (gnat_post_options): Clear warn_return_type.

Hasn't it enabled it also for any other FEs other than C family and Fortran?
Say jit, brig, go, lto?, ...
I think better would be to remove the initialization to -1 and revert the
fortran/options.c change, and instead use in the C family:
  if (!global_options_set.x_warn_return_type)
    warn_return_type = c_dialect_cxx ();

Unless it for some reason doesn't work for -Wall or -W or similar.

	Jakub



More information about the Gcc-patches mailing list