except.c
41.1 KB
-
c++: Fix -Wnoexcept handling of system headers (PR90992). · 5035cd66
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.
Jason Merrill committed