https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90992

--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jason Merrill <ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:5035cd662459b09605370f2ba41b2238119c69b1

commit r10-6238-g5035cd662459b09605370f2ba41b2238119c69b1
Author: Jason Merrill <ja...@redhat.com>
Date:   Sun Jan 26 00:37:24 2020 -0500

    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.

Reply via email to