https://gcc.gnu.org/bugzilla/show_bug.cgi?id=12411
Eric Gallager <egallager at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|GCC depends on undefined |Missed -Wsequence-point on |ISO C behavior (order of |functions (example reduced |execution) |from historical GCC source) --- Comment #6 from Eric Gallager <egallager at gcc dot gnu.org> --- (In reply to Eric Gallager from comment #5) > (In reply to Dara Hazeghi from comment #1) > > Confirmed. One example (cited in the thread) is: > > gcc/bb-reorder.c:1056: > > label = emit_label_before (gen_label_rtx (), get_insns ()); > > (In reply to Manuel López-Ibáñez from comment #3) > > This should be warned by -Wsequence-points. > > A reduced testcase based on that line still doesn't warn: > > $ cat 12411.c && /usr/local/bin/gcc -c -Wall -Wextra -pedantic > -Wsequence-point 12411.c > > int gen_label_rtx(void); > int get_insns(void); > int emit_label_before(int, int); > > int foo(void) > { > int label; > label = emit_label_before(gen_label_rtx(), get_insns()); > return label; > } > $ > > bb-reorder.c no longer contains the code in question though, so at least > this doesn't affect building gcc itself any longer (hopefully) ...thus, I should have retitled this... (doing so now)