[cfe-commits] r91073 - in /cfe/trunk: lib/Sema/SemaDecl.cpp test/Sema/return.c
Mike Stump
mrs at apple.com
Fri Dec 11 12:28:28 PST 2009
On Dec 10, 2009, at 7:37 PM, Eli Friedman wrote:
>> It is annoying when
>>
>> int foo() {
>> asm xor eax, eax
>> }
>>
>> gives a warning.
>
> If that actually works,
Yes, that works.
> it's pure luck.
I'd call it careful engineering.
> gcc warns because it's dangerous, no?
No, because I merely hadn't gotten around to fixing that bug yet.
>> Bear in mind, gcc's policy for:
>>
>> asm int foo() {
>> xor eax, eax
>> }
>>
>> is to _not_ give the warning.
>
> Yes; we should follow gcc's lead here.
:-)
More information about the cfe-commits
mailing list