Re: do {} while (0) nitpick
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jesse Zhang <sbjesse@gmail.com>
Cc: John Naylor <john.naylor@2ndquadrant.com>,
PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2020-05-04T15:28:37Z
Lists: pgsql-hackers
Jesse Zhang <sbjesse@gmail.com> writes: > On Fri, May 1, 2020 at 2:32 PM Tom Lane wrote: >> Grepping showed me that there were some not-do-while macros that >> also had trailing semicolons. These seem just as broken, so I >> fixed 'em all. > I'm curious: *How* are you able to discover those occurrences with grep? Um, well, actually, it was a little perl script with a state variable to remember whether it was in a macro definition or not (set on seeing a #define, unset when current line doesn't end with '\', complain if set and line ends with ';'). regards, tom lane
Commits
-
Get rid of trailing semicolons in C macro definitions.
- ad80d3ea27b1 9.5.22 landed
- a8df87d8638c 9.6.18 landed
- a2098b60216c 11.8 landed
- 49718aa9ee5e 10.13 landed
- c08da32f133b 12.3 landed
- 0da06d9faf9e 13.0 landed