This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/20230] GCC generates non-compliant warnings for qualifier promotion
- From: "falk at debian dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Feb 2005 13:20:59 -0000
- Subject: [Bug c/20230] GCC generates non-compliant warnings for qualifier promotion
- References: <20050227052446.20230.kmk@ssl.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From falk at debian dot org 2005-02-27 13:20 -------
(In reply to comment #5)
> Am I wrong? Where does it state in the C standard that you cannot perform a
> multi-level qualifier promotion?
Nowhere. It follows from the fact that it is not allowed explicitly in
6.5.16.1. The demand is:
-- both operands are pointers to qualified or unqualified versions
of compatible types, and the type pointed to by the left has all the
qualifiers of the type pointed to by the right;
but "pointer to char" is not compatible with "const pointer to const char".
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20230