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/81448] False positive -Werror=multistatement-macros in openssl


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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2017-07-26
     Ever confirmed|0                           |1

--- Comment #7 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
I think this is a real bug now:

void baz (void);

#define FOO for (int i = 0; i < 10; i++)

#define BAR                             \
void bar (void)                         \
{                                       \
  FOO                                   \
    baz ();                             \
  return;                               \
}

BAR

the warning is fooled because the "body" (baz();) and "next" are coming from
the same expansion, and "guard" isn't.

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