[Bug c/20230] GCC generates non-compliant warnings for qualifier promotion

falk at debian dot org gcc-bugzilla@gcc.gnu.org
Sun Feb 27 18:57:00 GMT 2005

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



More information about the Gcc-bugs mailing list