macro expansion and operator &&

Alex Druinsky alexdrui@post.tau.ac.il
Sat Aug 14 13:04:00 GMT 2010


Hi,

I am writing code in GCC's inline assembly, and I stumbled upon what  
looks like a bug in GAS. It appears that when GAS expands macros, it  
will sometimes replace expressions with operator && by expressions  
with operator &, changing the original meaning of the code.

I made a tiny program to illustrate the problem. To reproduce this,  
run the attached program and verify that the return code is 10. The  
return code should actually be 0.

Is this indeed a bug?

Alex

P.S.
I'm using gas from the Ubuntu package binutils 2.19.1-0ubuntu3.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: example.s
Type: text/x-c
Size: 430 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20100814/0ac07976/attachment.bin>


More information about the Binutils mailing list