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

kmk at ssl dot org gcc-bugzilla@gcc.gnu.org
Mon Feb 28 10:27:00 GMT 2005


------- Additional Comments From kmk at ssl dot org  2005-02-27 23:12 -------
> But "const char *" isn't a qualified version of "char *"

Ahhh. Now I see your point. Amazingly enough, the C standard does not, under any
circumstances, permit objects (including the targets of pointers) to be
qualifier promoted---only pointers themselves are so provided for.

While that may be _phenomenally_ stupid, I acknoledge that it is, in fact, a
direct interpretation of the standard. Accordingly, I withdraw my objection.
Since the behavior is literally non-compliant with the standard, it is perfectly
reasonable for the compiler to warn about it.

Thank you for the enlightenment.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20230



More information about the Gcc-bugs mailing list