This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/50662] Incorrect diagnostic returning non-const array pointer


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).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]