| Subject: | gcc not finding all occurences of potentially undefined values? |
|---|---|
| From: | Daniel Kabs <daniel.kabs@xxxxxx> |
| Date: | Tue, 15 Nov 2005 10:43:00 +0100 |
| Newsgroups: | gnu.gcc.help |
Hello there, after upgrading to a new version, gcc issues warnings on lines like a[i] = i++; i = i++; *p++ = func(*p); e.g. "test_increment.c:19: warning: operation on `i' may be undefined"I take it, this is because of the C standard saying, that if I have an expression and somewhere in that expression, I use an increment (decrement) operator on a variable, I can not mention that variable elsewhere in the expression. But why does gcc not warn about this code s.a = s.a++; p->a = p->a++;IMHO, these lines also infringe upon the above mentioned rule or did I miss something important? Cheers Daniel |
| Previous by Date: | Re: Using -fno-implicit-templates to control template instantiation., Paul Pluzhnikov |
|---|---|
| Next by Date: | Re: gcc not finding all occurences of potentially undefined values?, Paul Pluzhnikov |
| Previous by Thread: | Using -fno-implicit-templates to control template instantiation., DreamCoder |
| Next by Thread: | Re: gcc not finding all occurences of potentially undefined values?, Paul Pluzhnikov |
| Indexes: | [Date] [Thread] [Top] [All Lists] |