This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/41036] SIGSEGV with register asm esp
- From: "ubizjak at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Aug 2009 18:41:19 -0000
- Subject: [Bug c++/41036] SIGSEGV with register asm esp
- References: <bug-41036-18043@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from ubizjak at gmail dot com 2009-08-11 18:41 -------
(In reply to comment #0)
> Following code (written just for fun) leads to:
>
> Program received signal SIGSEGV, Segmentation fault.
> main () at main-general.cpp:95
> 95 printf("%d\n", x_reg);
>
>
> BTW, there is warning when using ecx, eax, edx.
> should there be any warning for esp?
No. You should be able to shoot yourself in the foot without warning.
IOW, you are changing stack pointer.
--
ubizjak at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41036