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/37947] p->count += inc(p); // value of p->count is wrong, if inc(p) not only returns an int but also increases p->counter



------- Comment #3 from micirio at gmx dot net  2008-10-29 01:44 -------
Thanks for the quick answer. Is it possible to get a warning if I write
undefined code like this? -Wall didn't tell me anything.

I'm asking, because I need to convert an existing (old) project where I found
this line that caused a segfault at a very other point in the source. So a
warning would avoid some odd surprises.


-- 


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


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