RayLivingston:

How many macros have you seen that use that do/while trick?

It’s very common. Looking at the Arduino install directory, for example:

```
find . -type f -iname '*.h' -exec grep -inPH --color "while ?\(0\)" {} \;
```

Just a sample:

```
./hardware/mighty-1284p-1.6.3/avr/bootloaders/optiboot/boot.h:798:} while (0)
./hardware/mighty-1284p-1.6.3/avr/bootloaders/optiboot/boot.h:810:} while (0)
./hardware/mighty-1284p-1.6.3/avr/bootloaders/optiboot/boot.h:822:} while (0)
./hardware/mighty-1284p-1.6.3/avr/bootloaders/optiboot/boot.h:834:} while (0)
./hardware/mighty-1284p-1.6.3/avr/bootloaders/optiboot/boot.h:846:} while (0)
```

Piping to “wc” to get the total:

```
689 2698 60291
```

One example from power.h:

```
#define power_all_enable() \
do { \
PR_PRGEN &= (uint8_t)~(PR_AES_bm|PR_EBI_bm|PR_RTC_bm|PR_EVSYS_bm|PR_DMA_bm|PR_USB_bm); \
PR_PRPA &= (uint8_t)~(PR_DAC_bm|PR_ADC_bm|PR_AC_bm); \
PR_PRPB &= (uint8_t)~(PR_DAC_bm|PR_ADC_bm|PR_AC_bm); \
PR_PRPC &= (uint8_t)~(PR_TWI_bm|PR_USART1_bm|PR_USART0_bm|PR_SPI_bm|PR_HIRES_bm|PR_TC1_bm|PR_TC0_bm); \
PR_PRPD &= (uint8_t)~(PR_TWI_bm|PR_USART1_bm|PR_USART0_bm|PR_SPI_bm|PR_HIRES_bm|PR_TC1_bm|PR_TC0_bm); \
PR_PRPE &= (uint8_t)~(PR_TWI_bm|PR_USART1_bm|PR_USART0_bm|PR_SPI_bm|PR_HIRES_bm|PR_TC1_bm|PR_TC0_bm); \
PR_PRPF &= (uint8_t)~(PR_TWI_bm|PR_USART1_bm|PR_USART0_bm|PR_SPI_bm|PR_HIRES_bm|PR_TC1_bm|PR_TC0_bm); \
} while(0)
```

So, 689 times in the Arduino install alone (I didn’t check if every “while (0)” was done for that reason, but why else would they have it?).