https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66341
Martin Sebor <msebor at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2015-05-30 CC| |msebor at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> --- Confirmed with both gcc and g++ 5.1.0. Below is a slightly smaller test case along with Clang output. $ cat t.c && gcc -Wall -c t.c && clang t.c struct A { int *i; }; void foo (struct A *a) { (int*)(struct A*)a->i = a->i; } t.c:5:27: error: expression is not assignable (int*)(struct A*)a->i = a->i; ~~~~~~~~~~~~~~~~~~~~~ ^ 1 error generated.