Instrument function exit with __builtin_unreachable in C++
authorMartin Liska <mliska@suse.cz>
Mon, 6 Nov 2017 09:02:15 +0000 (10:02 +0100)
committerMartin Liska <marxin@gcc.gnu.org>
Mon, 6 Nov 2017 09:02:15 +0000 (09:02 +0000)
commit1b6fa695ab5e6f6fd57ed9264b336f06f440125b
tree34f2706dd509a58f25ed69fda30793e918703da2
parent3232f0521cda16efeff012f65bc4d0b15d02a7e2
Instrument function exit with __builtin_unreachable in C++

2017-11-06  Martin Liska  <mliska@suse.cz>

PR middle-end/82404
* c-opts.c (c_common_post_options): Set -Wreturn-type for C++
FE.
* c.opt: Set default value of warn_return_type.
2017-11-06  Martin Liska  <mliska@suse.cz>

PR middle-end/82404
* constexpr.c (cxx_eval_builtin_function_call): Handle
__builtin_unreachable call.
(get_function_named_in_call): Declare function earlier.
(constexpr_fn_retval): Skip __builtin_unreachable.
* cp-gimplify.c (cp_ubsan_maybe_instrument_return): Rename to
...
(cp_maybe_instrument_return): ... this.
(cp_genericize): Call the function unconditionally.
2017-11-06  Martin Liska  <mliska@suse.cz>

PR middle-end/82404
* options.c (gfc_post_options): Set default value of
-Wreturn-type to false.

From-SVN: r254437
gcc/c-family/ChangeLog
gcc/c-family/c-opts.c
gcc/c-family/c.opt
gcc/cp/ChangeLog
gcc/cp/constexpr.c
gcc/cp/cp-gimplify.c
gcc/fortran/ChangeLog
gcc/fortran/options.c