[cpp-threads] RE: volatile, memory models, threads

Nelson, Clark clark.nelson at intel.com
Wed Mar 1 16:46:07 GMT 2006


> No, it isn't.  There is no problem about pointer arithmetic - it is
> just relative to the sizeof value of the type, and cv-qualified and
> unqualified types are different types.  The ONLY linkage is 
> the ability
> to add cv-qualifiers - nothing else.  Break that for a particular
> qualifier, and the sizeof sizes can vary.

I want to be sure I understand you. You seem to be saying that all the
other places in the standard which *seem* to promise that a cv-qualified
type must have the same size as an unqualified type can be interpreted
not to do so, and that the only provision of the standard which actually
requires that they have the same size is the promise about adding
qualifiers in a pointer conversion.

If that were true, the next question would be: so what? The net result
is still that cv-qualified and unqualified types must have the same
size. You could propose to change that, and point out all the loopholes
in the other paragraphs in the standard. I suspect that the result would
be a lot of editorial clarifications; that the committee would ratify
the "common assumptions" about what it already intends to say.

> Look, this is getting ridiculous.  I have given you chapter and verse
> from the standard.  If you can provide equivalent references, 
> please do
> so.  If not, please stop contradicting the standard with what I agree
> are common assumptions.

Oh, and concerning chapter and verse: have you considered 3.10p15, which
allows access to an object through a cv-qualified lvalue referring to
it?

Clark



More information about the cpp-threads mailing list