[LLVMbugs] [Bug 19170] New: Objective C NSNumbers like @6 are not considered constexpr

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Mar 18 00:46:20 PDT 2014


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

            Bug ID: 19170
           Summary: Objective C NSNumbers like @6 are not considered
                    constexpr
           Product: clang
           Version: 3.3
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
          Assignee: unassignedclangbugs at nondot.org
          Reporter: peter at stairways.com.au
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Xcode 5.1:

constexpr NSNumber* kTimeSavedThisVersionKey = @6;

errors with message:

.../HTimeSaved.mm:19:48: Constexpr variable 'kTimeSavedThisVersionKey' must be
initialized by a constant expression

This works for example:

constexpr NSString* kTimeSavedThisVersionKey = @"6";

Apple LLVM version 5.1 (clang-503.0.38) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.1.0
Thread model: posix

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140318/cd6ca71e/attachment.html>


More information about the llvm-bugs mailing list