[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 
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



More information about the Gcc-bugs mailing list