This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: statement expressions and extended asm bug?
Gunther Nikl wrote:
That would explain the behaviour. Are you sure that your interpretation
is right? The documenation says:
"...allows you to use loops, switches, and local variables within an
expression."
correct
I suspect if you did not allocate variable _d0 to an explicit register,
then things would behave.
Thats correct. If I assign the register variable to a non-register
variable inside the expression, the generated code works as expected.
However, if I understand you correctly that might be an accident
nonetheless. Consider the maxint example from the documentation about
No, that's not an accident.
statement expression. Using it twice in a function call should then
also violate the sequence point constraints of C, shouldn't it?
no.
It is your explicit allocation of the two temporary variables into the
same register that is breaking things.
nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
nathan@codesourcery.com :: http://www.planetfall.pwp.blueyonder.co.uk