This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/45249] Indirect variable parameters sometimes cause segmentation fault



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]