This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/81364] Bogus -Wmultistatement-macros warning


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

--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Author: mpolacek
Date: Tue Jul 25 09:49:08 2017
New Revision: 250498

URL: https://gcc.gnu.org/viewcvs?rev=250498&root=gcc&view=rev
Log:
        PR c/81364
        * c-parser.c (c_parser_else_body): Don't warn about multistatement
        macro expansion if the body is in { }.
        (c_parser_while_statement): Likewise.
        (c_parser_for_statement): Likewise.

        * Wmultistatement-macros-12.c: New test.

Added:
    trunk/gcc/testsuite/c-c++-common/Wmultistatement-macros-12.c
Modified:
    trunk/gcc/c/ChangeLog
    trunk/gcc/c/c-parser.c
    trunk/gcc/testsuite/ChangeLog

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]