Instrument function exit with __builtin_unreachable in C++
commit2fb20ba2e4f3f036716fc7cfe5d4c5c713297874
authormarxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 6 Nov 2017 09:02:15 +0000 (6 09:02 +0000)
committermarxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 6 Nov 2017 09:02:15 +0000 (6 09:02 +0000)
tree34f2706dd509a58f25ed69fda30793e918703da2
parent6753d6c7a472f925688c6af3cb498b7c795fcc4d
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@254437 138bc75d-0d04-0410-961f-82ee72b054a4
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