diff options
author | Jason Merrill <jason@redhat.com> | 2020-01-26 00:37:24 -0500 |
---|---|---|
committer | Jason Merrill <jason@redhat.com> | 2020-01-26 21:26:17 -0500 |
commit | 5035cd662459b09605370f2ba41b2238119c69b1 (patch) | |
tree | 92714a88784da28de205aa1159b73407cf1601cd /gcc/fortran/trans-expr.c | |
parent | cf17dcc6fc1f9f69d592952c2dd5796a5665bd5a (diff) | |
download | gcc-5035cd662459b09605370f2ba41b2238119c69b1.zip gcc-5035cd662459b09605370f2ba41b2238119c69b1.tar.gz gcc-5035cd662459b09605370f2ba41b2238119c69b1.tar.bz2 |
c++: Fix -Wnoexcept handling of system headers (PR90992).
The immediate issue here was that the second warning didn't depend on the
first one, so if the first location was in a system header, we'd
mysteriously give the second by itself.
It's also the case that the thing we care about being in a system header is
the function that we want to suggest adding 'noexcept' to, not the
noexcept-expression; it's useful to suggest adding noexcept to a user
function to satisfy a noexcept-expression in a system header.
PR c++/90992
* except.c (maybe_noexcept_warning): Check DECL_IN_SYSTEM_HEADER and
temporarily enable -Wsystem-headers. Change second warning to
conditional inform.
Diffstat (limited to 'gcc/fortran/trans-expr.c')
0 files changed, 0 insertions, 0 deletions