[Bug c++/30988] [4.1/4.2/4.3 Regression] Incorrect "no return statement" warning with __attribute__ ((noreturn)) and __FUNCTION__

jakub at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Sun Nov 18 22:21:00 GMT 2007



------- Comment #6 from jakub at gcc dot gnu dot org  2007-11-18 22:21 -------
Subject: Bug 30988

Author: jakub
Date: Sun Nov 18 22:20:54 2007
New Revision: 130280

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=130280
Log:
        PR c++/30988
        semantics.c (finish_call_expr): Set current_function_returns_abnormally
        if fn is noreturn FUNCTION_DECL or OVERLOAD with all noreturn
        functions.

        * g++.dg/warn/noreturn-4.C: New test.
        * g++.dg/warn/noreturn-5.C: New test.
        * g++.dg/warn/noreturn-6.C: New test.
        * g++.dg/warn/noreturn-7.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/warn/noreturn-4.C
    trunk/gcc/testsuite/g++.dg/warn/noreturn-5.C
    trunk/gcc/testsuite/g++.dg/warn/noreturn-6.C
    trunk/gcc/testsuite/g++.dg/warn/noreturn-7.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/semantics.c
    trunk/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30988



More information about the Gcc-bugs mailing list