This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gimple] assignments to volatile

On 07/09/10 06:27, Mike Stump wrote:
On Jul 5, 2010, at 1:59 AM, Nathan Sidwell wrote:
Do you have a reference to the C standard that clarifies the difference?

Sure, it would be the part where the edits are when we ask them to regularize the rules with C++ after C++ fixes what they broke. :-) That is why I carefully chose the phrase `what we should do' as opposed to, what the standard says...

Wrt the std, all those expression-statements have values - the first is an lvalue, the other 2 are rvalues.

Yeah, I know.

Another example I missed is:
  expr, vobj;

I think that should read vobj.

:-) gcc fetches. I'd not oppose that.

But AFAICT 'expr, vobj = data;' and 'expr, vobj;' are identically rvalued according to the C std. Is there anything in the std that justifies them behaving differently?

Nope, don't think so, at least in the C standard.

Good, so I think we're all agreed that what the C standard says is not the behaviour we want.


Nathan Sidwell    ::   ::         CodeSourcery

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]