This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/45249] Indirect variable parameters sometimes cause segmentation fault
- From: "rogerio at rilhas dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Aug 2010 10:16:53 -0000
- Subject: [Bug c++/45249] Indirect variable parameters sometimes cause segmentation fault
- References: <bug-45249-19547@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #57 from rogerio at rilhas dot com 2010-08-12 10:16 -------
(In reply to comment #56)
> Please stop wasting your and GCC developers time. As several people have
> explained, your code triggers undefined behavior in C/C++, so it can do
> anything at runtime. The fact that it happens to work as you expect with some
> compilers doesn't mean anything. If you choose to program in C (or C++), you
> just need to follow the standard. GCC bugzilla is for reporting GCC bugs, not
> for learning programming languages, look for various C forums instead.
I've clearly shown the bug in my commment #51. It is a bug in the address
operator. C99 says GCC shouldn't be doing that. The &format is not undefined
behavior. In comment #36 Richard Guenther agrees that &X should return the
stack address. GCC is not doing that. Please open your eyes and understand
this. It is simple. I believe you all have the brain power to understand at
least that. If you just forget all the rest and focus on &X you'll see GCC has
a bug. If you fix it I can then handle the rest on my own, thank you, no need
for all your rants about standards. You are the ones who shouldn't be wasting
my time like this.
--
rogerio at rilhas dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Resolution|INVALID |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45249