[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gcc
Subject:    Re: New problems with gcc-2.8.0 based code - NOW FIXED!
From:       Paul Koning <pkoning () xedia ! com>
Date:       1998-01-05 16:45:41
[Download RAW message or body]

>>>>> "Philippe" == Philippe De Muyter <phdm@macqel.be> writes:

 >> Perhaps in the short term we should arrange for asms with no
 >> outputs to be automatically marked volatile, and to issue a
 >> warning (something like "nonvolatile `asm' has no outputs" would
 >> do) to point out to people that they are on shaky ground.  Also,
 >> we should fix the manual to be unambiguous.  Then,
 Philippe> Perhaps could `automatically' depend of a
 Philippe> -foutputless-asm-is-volatile flag, just like g++ has a flag
 Philippe> to ask for the old `for'-scope rule.

All those things are possible.  Any of them could be the best choice
if there are cases where it is really *useful* or *important* for
outputless asm to be treated as not volatile.

But I don't think there are any such cases.  I haven't seen anyone
mention any.  (If they were mentioned in a message to gcc2 only, my
apologies, I haven't yet succeeded in subscribing to that so if it
wasn't sent to egcs or cc'ed to me I haven't seen it.)  Richard did
mention some cases where treating outputless asm as non-volatile is
*harmless*, but that's a different matter.

The current state is that there is an explicit sentence in the
documentation that says outputless asm is volatile.  (The example
directly above it muddles this by saying "volatile" explicitly.  But
it's hard to argue that this means the documentation intended the
opposite, because then how would you explain the existence of the
sentence that says outputless means volatile?)

Furthermore, the fix to make the compiler do that is one line long.
And it has been strongly argued and never refuted that doing this will
make code more reliable.

So, with all that it really baffles me how much energy is being spent
proposing alternatives that will create more work, more confusing
documentation, more switches in the user interface, all to enable a
capability (non-volatile outputless asm) that serves no purpose.

	paul

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic