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

            Bug ID: 15621
           Summary: __builtin_popcount should be constexpr
           Product: clang
           Version: 3.2
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++11
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified

switch(argc)
  {
    case __builtin_popcountll(2):
      return 1;
    default:
      return 0;
  }


$ g++ -std=c++11 main.cpp
$ clang++ -std=c++11 main.cpp
main.cpp:228:10: error: case value is not a constant expression
    case __builtin_popcountll(2):
         ^
1 error generated.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to