http://llvm.org/bugs/show_bug.cgi?id=10288
Summary: Clang rejects string literal initializer for char
array that has no explicit size
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
Clang rejects "#1" and accepts "#2"
char x[]("hello"); // #1
char x[6]("hello"); // #2
The example in clause 8.5.2 makes it clear that deducing the size of the
initialized array is not dependent on enclosing braces, showing this example
char x[] = "hello"; // no braces around the initializer
This is accepted by clang. The existence of parentheses (not braces) around the
initializer expression should not make a difference for non-class types, see
8.5p11.
--
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs