https://llvm.org/bugs/show_bug.cgi?id=23105
Bug ID: 23105
Summary: C: allow conversion of pointer to arrays to pointers
to const arrays
Product: clang
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Frontend
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
Starting with version 5, gcc will not warn anymore about incompatible pointer
types when converting a pointer to an array to a pointer to a const array. (The
underlying issue in the C standard is that the qualifier is attached to the
element type, so the usual rule which allows addition of a qualifier to a
pointer target does not apply). Please also consider this change for clang.
This would allow reasonable code such as the following to work without
warnings:
void foo(const double input[3][3]);
double b[3][3];
foo(b);
--
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