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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

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

--- Comment #11 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Max TenEyck Woodbury from comment #10)
> There is no VARIABLE, just a TEMPORARY r-value like  all the others that hold
> intermediate results.

Yes and temporary rvalues can be removed if unused.

> 
> Also, the LANGUAGE semantics has the operator produce a result, an r-value,
> that
> has to be represented in some manner, that is, it has a store of some kind.
> The machine code generated without optimization is required to put that
> result
> into the store before incrementing the specified l-value. (sub-clause
> 6.2.5.4)
> Optimization is allowed to, but not required to, remove such operations as
> long
> as the change produces no detectable change in the program's results.

Yes but rvalues are can be removed as unused.

> 
> Now, stop misrepresenting the standard.  It makes your other pronouncements
> less credible.

I am not misrepresenting the standard here as there is a conversion between
lvalue and rvalue here.

> 
> To go over this again, if a piece of code specifies a postfix operation
> conceptually, the original value is stored somewhere.  That stored value is
> then
> discarded.   Those steps are extraneous and the code would be conceptually
> cleaner without them.  As such, their present is a defect, a trivial defect,
> but
> still a defect.  Using the prefix operator in its place improves to code,
> again
> trivially, but it does improve it.  Such changes may want to cite something
> as
> justification for the change.  This report is such a justification.  Until
> all
> such defects have been removed, it should stay open.

Again the rvalues can be removed as unused.  This is allowed in the standard
and so the semantics of the tree codes is that if the result is unused then
there is no rvalue that happens.

Reply via email to