[LLVMbugs] [Bug 16314] New: clang allows conversion from string literal to non-const char* in C++11 mode

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Jun 12 19:48:23 PDT 2013


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

            Bug ID: 16314
           Summary: clang allows conversion from string literal to
                    non-const char* in C++11 mode
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++11
          Assignee: unassignedclangbugs at nondot.org
          Reporter: richard-llvm at metafoo.co.uk
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Clang rejects this valid C++11 code:

  void f(char*);
  int &f(...);
  int &r = f("foo");

There is no conversion from string literal to non-const char* in C++11.

-- 
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/20130613/2e379f23/attachment.html>


More information about the llvm-bugs mailing list