From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Koning To: phdm@macqel.be Cc: Philip.Blundell@pobox.com, rms@gnu.org, kenner@vlsi1.ultra.nyu.edu, gcc2@cygnus.com, egcs@cygnus.com Subject: Re: New problems with gcc-2.8.0 based code - NOW FIXED! Date: Mon, 05 Jan 1998 10:13:00 -0000 Message-id: <9801051645.AA04291@kona.> References: <199801030231.DAA25241@mail.macqel.be> X-SW-Source: 1998-01/msg00103.html >>>>> "Philippe" == Philippe De Muyter 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