[Bug other/82784] Remove semicolon after "do {} while (0)" macros

vries at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sun Nov 19 12:36:00 GMT 2017


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82784

--- Comment #15 from Tom de Vries <vries at gcc dot gnu.org> ---
Created attachment 42653
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42653&action=edit
conformance scan results

Output from command:

$ rm -f OUTPUT; for f in $(find . | egrep -v '\.git|/testsuite/'); do echo $f;
( perl -p -e 's/\\\n//' $f| egrep "#.*define.*while \((false|0)\);"); done |
grep -B1 'while (' > OUTPUT

The gcc/read-rtl-function.c, gcc/print-rtl-function.c and
./gcc/config/arc/arc.c are short-lived macros in combination with .def files.
We could replace "do { ... } while (0)" with "{ ... }" but I'm not sure yet
what the right approach is here.

I've submitted the libgcc/config/alpha/vms-unwind.h one (
https://gcc.gnu.org/ml/gcc-patches/2017-11/msg01661.html ) .

I've just fixed the gcc/config/arc/arc.h one (
https://gcc.gnu.org/ml/gcc-patches/2017-11/msg01663.html ).


More information about the Gcc-bugs mailing list