This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/16602] Spurious warnings about pointer to array -> const pointer to array conversion
- From: "jozef dot behran at krs dot sk" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Sep 2007 12:33:27 -0000
- Subject: [Bug c/16602] Spurious warnings about pointer to array -> const pointer to array conversion
- References: <bug-16602-8968@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #7 from jozef dot behran at krs dot sk 2007-09-26 12:33 -------
Hm, I must apologize for argumenting about wrong point of this issue. Now I can
see why other sometimes say "think before you type" :)
The problem here is not whether applying const to "array of int" makes "const
array of int" or "array of const int". The problem here is why gcc does not
apply that "const" automatically and rather complains about incompatible
pointer types.
I am reopening the bug cause I still don't have a clue why "pointer to array of
ints" typed expression is assignment incompatible with a "pointer to array of
const ints" typed lvalue. Especially when "pointer to int" typed expression IS
assignment compatible with "pointer to const int" typed lvalue. This is what is
this bug all about.
--
jozef dot behran at krs dot sk changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|INVALID |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16602