int main() { char* data; *data++ = *data+1; } $ g++ -Wall tt.cpp tt.cpp: In function ‘int main()’: tt.cpp:7: warning: operation on ‘data’ may be undefined afaik "=" is a sequence point, so there shouldn't be any undefined behaviour here.
-- Summary: Wsequence-point false positive Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: middle-end AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: mueller at kde dot org CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: i686-pc-linux-gnu GCC host triplet: i686-pc-linux-gnu GCC target triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18477