http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54907
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-10-12 11:23:52 UTC --- On the RHS of the assignment *p is modified, not p The difference in behaviour between gcc and g++ is probably due to http://gcc.gnu.org/viewcvs?view=revision&revision=176072