[LLVMbugs] [Bug 23105] New: C: allow conversion of pointer to arrays to pointers to const arrays
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu Apr 2 00:33:28 PDT 2015
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: unassignedclangbugs at nondot.org
Reporter: uecker at eecs.berkeley.edu
CC: llvmbugs at cs.uiuc.edu
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150402/cdfeafc4/attachment.html>
More information about the llvm-bugs
mailing list