[LLVMbugs] [Bug 11739] New: Have a fixit for |const char[] kFoo = "foo"; | et al
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Jan 10 16:02:00 PST 2012
http://llvm.org/bugs/show_bug.cgi?id=11739
Bug #: 11739
Summary: Have a fixit for |const char[] kFoo = "foo";| et al
Product: clang
Version: unspecified
Platform: PC
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P
Component: Frontend
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: nicolasweber at gmx.de
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
After writing a bunch of Java, I sometimes write something like:
const char[] kFoo = "foo"
Clang and gcc both point out that this is wrong:
test.c:1:11: error: expected identifier or '('
const char[] kFoo = "foo";
^
1 error generated.
This is a decent warning, but it would be fantastic if clang could also say
"This isn't Java: put [] behind kFoo instead" (probably without the "This isn't
java" part :-) ).
--
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