http://llvm.org/bugs/show_bug.cgi?id=9082
Summary: Clang should emit pedantic warnings for conversions
to/from pointers to qualifier arrays
Product: clang
Version: trunk
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
According to the C standard, conversions like the following are technically
casting away const-ness, because array types are never qualified: qualifiers
apply only to the element type.
const void * -> const int (*)[5]
const int * -> const int (*)[5]
Similarly, this is not supposed to be a valid qualification conversion:
int (*)[10] -> const int (*)[10]
These are kindof arbitrary restrictions that do make life unnecessarily
difficult for real users; I think clang's model (where the array and element
are simultaneously qualified) really makes a lot more sense. Nonetheless, we
should at the very least provide -pedantic warnings about these conversions not
being permitted by the standard(s).
--
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