This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Compiling GCC With a C++ Compiler (g++)
Andreas Schwab <schwab@suse.de> writes:
| Gabriel Dos Reis <gdr@cs.tamu.edu> writes:
|
| > Andreas Schwab <schwab@suse.de> writes:
| >
| > | Gabriel Dos Reis <gdr@cs.tamu.edu> writes:
| > |
| > | > Gosh, scratch "object" if that bothers you.
| > | >
| > | > It does not matter whether the lvalue is used to modify a small part
| > | > of or the whole *p.
| > |
| > | Where does the standard state that qualifying a struct member makes the
| > | whole struct qualified?
| >
| > I said *nonmodifiable*.
|
| And non-modifiable comes from qualifying with const.
and other sources.
| > And the standard quote is the one you left out.
|
| Which does not answer my question anyway.
You asked where the standard says that qualifying a struct member
member makes the whole struct qualified? I told you I did not say
something like that. What I said and what the C standard says is that
if an lvalue of type structure type has a member that is
const-qualified, then the lvalue is nonmodifiable -- it just suffices
that -one- member is const-qualified.
If you're making the assumption that nonmodifiability necessarily
implies that the whole thing is const-qualified, then you're wrong and
I'm not surprised you're not satisfied with what the standard says.
-- Gaby