[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

2008-10-28 Thread micirio at gmx dot net
--- 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

[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

2008-10-28 Thread micirio at gmx dot net
--- Comment #1 from micirio at gmx dot net 2008-10-29 01:29 --- Created an attachment (id=16579) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16579&action=view) test.i -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37947

[Bug c/37947] New: p->count += inc(p); // value of p->count is wrong, if inc(p) not only returns an int but also increases p->counter

2008-10-28 Thread micirio at gmx dot net
also increases p- >counter Product: gcc Version: 4.1.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: micirio at gmx dot net http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37947