[LLVMbugs] [Bug 12948] New: invalid "'noreturn' should not return"

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri May 25 09:33:58 PDT 2012


http://llvm.org/bugs/show_bug.cgi?id=12948

             Bug #: 12948
           Summary: invalid "'noreturn' should not return"
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: roman at binarylife.net
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified


$ cat test.cpp
template<int>
void foo() __attribute__((__noreturn__));

template<int>
void foo() {
  while (1) continue;
}

void bar() __attribute__((__noreturn__));

void bar() {
  foo<0>();
}

$ clang++ -c test.cpp
test.cpp:13:1: warning: function declared 'noreturn' should not return
[-Winvalid-noreturn]
}
^
1 warning generated.

$ clang++ --version
clang version 3.2 (trunk 157392)
Target: x86_64-unknown-linux-gnu
Thread model: posix

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list