http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52554

webmaster at openhardware dot de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |webmaster at openhardware
                   |                            |dot de

--- Comment #5 from webmaster at openhardware dot de 2012-03-28 09:36:47 UTC ---
Hi, I tested the 42 it mit older gcc, and it behaved better:

 gcc --version
gcc (GCC) 4.2.4 (Gentoo 4.2.4 p1.0)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


 cat >try.c
int $42 = 0;

int main(void) {
    return $42;
}


 gcc try.c; ./a.out; echo $?  
/tmp/ccY61UFa.s: Assembler messages:
/tmp/ccY61UFa.s:18: Error: junk `(%rip)' after expression
bash: ./a.out: No such file or directory
127

 gcc -O2 try.c; ./a.out; echo $? 
/tmp/ccXk0zWe.s: Assembler messages:
/tmp/ccXk0zWe.s:8: Error: junk `(%rip)' after expression
bash: ./a.out: No such file or directory
127


But I would expect an syntax error thrown by gcc here.

Reply via email to