--- 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 th
--- Additional Comments From kmk at ssl dot org 2005-02-27 22:03 ---
And furthermore, if it is so "useful" to be able to hide this behavior, why have
this option at all? Why force programmers to undertake the two-step bomb-arming
instead of just letting them do it in one step
--- Additional Comments From kmk at ssl dot org 2005-02-27 21:55 ---
It is precisely because it is "useful" to programmers in the manner described
that a check is needed on it so that persons charged with the task of code
validation or modification do not have to read 250,00
--- Additional Comments From kmk at ssl dot org 2005-02-27 21:43 ---
6. I meant "right-hand side" not "left-hand side".
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20230
--- Additional Comments From kmk at ssl dot org 2005-02-27 21:37 ---
1. A pointer is a derived type.
2. A derived type is not qualified by the qualifiers (if any) of the type from
which it is derived.
3. For any qualifier q, a POINTER to a non-q-qualified type may be converted to
a
--- Additional Comments From kmk at ssl dot org 2005-02-27 12:48 ---
I'm not sure I understand why it is thought that the C standard forbids the
conversion I'm talking about here. In fact, the final committee draft of the ISO
C standard that I have appears to be silent about th
--- Additional Comments From kmk at ssl dot org 2005-02-27 06:03 ---
Exactly where does it state that you can only promote one _level_ of qualifier,
as opposed to promoting a single qualifier scope more than once?
Not only that, but even if you declare the string array this way,
char a
--- Additional Comments From kmk at ssl dot org 2005-02-27 05:40 ---
Actually, the documentation clearly claims:
"Warn WHENEVER a pointer is cast so as to remove a type qualifier from the
target type."
It does not say:
"Warn whenever a pointer is cast to ANOTHER POINTE
: GCC generates non-compliant warnings for qualifier
promotion
Product: gcc
Version: 3.4.3
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: debug
AssignedTo: unassigned at gcc dot gnu dot org
Report
Summary: -Wcast-qual option is easily evaded
Product: gcc
Version: 3.4.3
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: debug
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: kmk at ssl dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20229
10 matches
Mail list logo