"D. Hugh Redelmeier" <[EMAIL PROTECTED]> writes:

| | From: Gabriel Dos Reis <[EMAIL PROTECTED]>
| 
| |  After many exchanges via private mails and
| | looking at the various reports related to this issue, it has become
| | clear to me that the interpretations offered to justify why GCC is
| | behaving the way it does seem to go beyond what can be inferred.
| 
| OK.
| 
| Is there a consensus on this?

JSM, please chime in.

| If not, how can a consensus be reached?

try to explain those who read the standard to you their interpretation
does not match the intent and the letter?  Sorry :-)

More seriously, at this point Daniel Berlin has indicated that he gives
"less of a crap about volatile and optimizing volatile than [he does]
const, restrict, etc".  So that is, I hope, a path to a saner behaviour
from the code transformation part of the compiler.

| If so, how can we get a fix?
| 
| I think that is urgent.  This bug is causing X to misbehave and the
| current workarounds might be harmful.  Who knows what other
| manifestations might be lurking?
| 
| As I said, I'm not a GCC hacker.  Who is the likely maintainer to fix
| this?  Does he or she agree that this needs to be done?  Urgently?

Joseph S. Myers (jsm at polyomino.org.uk) and Richard Henderson (rth
at redhat.com) are the C front-end maintainers.  The following is
from the last message I received from Joseph (on access through volatile
lvalue expression): 

  # Using always the qualification of the lvalue is reasonable semantics to 
  # specify (I don't know about to implement).  It's still a matter of making 
  # a choice and documenting and implementing it.

The issue is compounded by the fact that the code transformation part
(the "optimizer") is maintained by a different set of people and it takes
coordination between both worlds to arrive to a useful semantics. 

At this point we need:
  (1) agreement from C and C++ maintainers on access through volatile
      lvalue 
  (2) agreement with the middle-end maintainers not to "optimize"
      volatile lvalue expressions
  (3) document the behaviour.

The most important for you and X is to have (2) done, i.e. Richard
Henderson, Roger Sayle, Daniel Berlin and others.

-- Gaby

Reply via email to