This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/50662] Incorrect diagnostic returning non-const array pointer
- From: "jsm28 at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 08 Oct 2011 16:04:52 +0000
- Subject: [Bug c/50662] Incorrect diagnostic returning non-const array pointer
- Auto-submitted: auto-generated
- References: <bug-50662-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50662
Joseph S. Myers <jsm28 at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
--- Comment #1 from Joseph S. Myers <jsm28 at gcc dot gnu.org> 2011-10-08 16:04:52 UTC ---
This is not a bug. You can implicitly convert "pointer to int" to "pointer to
const int", but not "pointer to array of int" to "pointer to array of const
int" (see 6.5.16.1), and "const that_type *" is "pointer to array of const int"
(there is no such type as "pointer to const array of int", which would be a
permitted target of such a conversion; see 6.7.3#8).