[LLVMbugs] [Bug 6274] New: -Wreturn-type warning for function using __builtin_expect

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Wed Feb 10 09:49:13 PST 2010


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

           Summary: -Wreturn-type warning for function using
                    __builtin_expect
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Semantic Analyzer
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: sharparrow1 at yahoo.com
                CC: llvmbugs at cs.uiuc.edu
            Blocks: 5511


Testcase:
int a() { if (__builtin_expect(1,1)) return 1; }

Warns with -Wreturn-type; shouldn't warn because the return is always executed.

This blocks Firefox because it uses a construct like this and
-Werror=return-type.


-- 
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