[Bug c++/70741] New: segfault when jumping into statement expression in array initializer

2016-04-20 Thread donald.chai at synopsys dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: donald.chai at synopsys dot com Target Milestone: --- Preface: 1) Apologies if this is the wrong component. 2) Yes, this code is crazy. I was testing our own compiler. :) GCC 5.x

[Bug c++/70744] New: preincrements possibly double-evaluated in GNU ternaries

2016-04-20 Thread donald.chai at synopsys dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: donald.chai at synopsys dot com Target Milestone: --- GCC, in C++ mode, appears to evaluate pre-increments twice in GNU ternaries: $ gcc-5 --version gcc-5 (Ubuntu 5.2.1-23ubuntu1~12.04) 5.2.1

[Bug c++/70744] preincrements possibly double-evaluated in GNU ternaries

2016-04-21 Thread donald.chai at synopsys dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70744 --- Comment #5 from Donald Chai --- For what it's worth, post-increments behave as I would expect: $ cat test.c int main() { int x = 1; x++ ?: 0xbeef; return x; } $ gcc-5 -x c test.c; ./a.out; echo $? 2 $ gcc-5 -x c++ test.c; ./a.out