Replacement for AVR libc ATOMIC_BLOCK macros, now for DUE and other platforms.

pico:
...

Whoops, sorry. I misread your post as "The avr-libc macros won't reenable macros if break is used" which I still believe is false. You are correct that break is still a valid statement, and that this would be an ever greater problem:

volatile int count; // updated by interrupt

while(1) {
  if (digitalRead(2)) {
    break; // Breaks out of outer while
  }
  ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
    if (count > 5) break; // BUG, outer while is not `broken'.
  }
}