"pinskia at gcc dot gnu dot org" <[EMAIL PROTECTED]> writes:

| See PR 21568 and http://gcc.gnu.org/ml/gcc/2005-05/msg00085.html.

Both those issues about completely *different* from the issue
submitted in this PR.  In the above cases, the accessed object actually
is NOT volatile.  This is not the same here.

In this PR, the only thing the function sees is that its parameter
is not declared pointer to volatile char, but just pointer to char.
That is NO basis for the compiler to assume that the cast performed
inside the body is invalid assumption.  No. Never.  
Consequently, it must assume that the pointed-to object might be
effectively volatile and consequently generate corresponding code.

There is a difference between cv-qualified object and a pointer to
cv-qualified object.  In the former cases, you do know for sure how
the object behaves, in the latter you don't.  Consequently you must
make conervative assumptions.

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

Andrew --

  Once again, refrain from closing an issue when you do not fully
understand the issue at hand.

The PR should be reopen as wrong-code generation.

-- Gaby

Reply via email to