https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111151
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> --- Created attachment 55794 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55794&action=edit fold "dumping" This adds DUMP_FOLD, but I get /home/rguenther/src/trunk/gcc/fold-const.cc:6808:22: warning: ISO C++ forbids braced-groups within expressions [-Wpedantic] #define DUMP_FOLD(X) ({ auto x = (X); if (x && dump_file && (dump_flags & TDF_FOLDING)) fprintf (dump_file, "Applying fold-const.c:%d\n", __LINE__); x; }) ^ /home/rguenther/src/trunk/gcc/fold-const.cc:7193:15: note: in expansion of macro 'DUMP_FOLD' return DUMP_FOLD (fold_build2 (code, ctype, fold_convert (ctype, op0), ^~~~~~~~~ with #define DUMP_FOLD(X) ({ auto x = (X); if (x && dump_file && (dump_flags & TDF_FOLDING)) fprintf (dump_file, "Applying fold-const.c:%d\n", __LINE__); x; }) so maybe need to use __extension__ and #if __GNUC for this?