This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/81448] False positive -Werror=multistatement-macros in openssl
- From: "mpolacek at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 26 Jul 2017 12:38:34 +0000
- Subject: [Bug c/81448] False positive -Werror=multistatement-macros in openssl
- Auto-submitted: auto-generated
- References: <bug-81448-4@http.gcc.gnu.org/bugzilla/>
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.