[Bug c/80116] Warn about macros expanding to multiple statements

2017-06-26 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80116 Marek Polacek changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug c/80116] Warn about macros expanding to multiple statements

2017-06-26 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80116 --- Comment #5 from Marek Polacek --- Author: mpolacek Date: Mon Jun 26 10:02:27 2017 New Revision: 249643 URL: https://gcc.gnu.org/viewcvs?rev=249643=gcc=rev Log: PR c/80116 * c-common.h (warn_for_multistatement_macros):

[Bug c/80116] Warn about macros expanding to multiple statements

2017-05-30 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80116 Marek Polacek changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned

[Bug c/80116] Warn about macros expanding to multiple statements

2017-05-22 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80116 --- Comment #3 from Marek Polacek --- A testcase: #define SWAP(x, y) \ tmp = x; \ x = y; \ y = tmp int x, y, tmp; void fn1 (void) { if (x) SWAP(x, y); // warn } void fn2 (void) { SWAP(x, y); } void fn3 (void) { if (x) {

[Bug c/80116] Warn about macros expanding to multiple statements

2017-03-20 Thread egall at gwmail dot gwu.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80116 Eric Gallager changed: What|Removed |Added CC||egall at gwmail dot gwu.edu --- Comment

[Bug c/80116] Warn about macros expanding to multiple statements

2017-03-20 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80116 Martin Sebor changed: What|Removed |Added Keywords||diagnostic