noInterrupts (); before enabling or changing WDT vs. BODS

A good example of my question is code from Nick Gammon's forum

#include <avr/sleep.h>
#include <avr/wdt.h>

const byte LED = 9;
  
// watchdog interrupt
ISR (WDT_vect) 
{
   wdt_disable();  // disable watchdog
}  // end of WDT_vect
 
void setup () { }

void loop () 
{
 
  pinMode (LED, OUTPUT);
  digitalWrite (LED, HIGH);
  delay (50);
  digitalWrite (LED, LOW);
  pinMode (LED, INPUT);
  
  // disable ADC
  ADCSRA = 0;  

  // clear various "reset" flags
  MCUSR = 0;     
  // allow changes, disable reset
  WDTCSR = bit (WDCE) | bit (WDE);
  // set interrupt mode and an interval 
  WDTCSR = bit (WDIE) | bit (WDP2) | bit (WDP1);    // set WDIE, and 1 second delay
  wdt_reset();  // pat the dog
  
  set_sleep_mode (SLEEP_MODE_PWR_DOWN);  
  noInterrupts ();           // timed sequence follows
  sleep_enable();
 
  // turn off brown-out enable in software
  MCUCR = bit (BODS) | bit (BODSE);
  MCUCR = bit (BODS); 
  interrupts ();             // guarantees next instruction executed
  sleep_cpu ();
  
  // cancel sleep as a precaution
  sleep_disable();
  
  } // end of loop

I believe that the reason for noInterrupts () before setting the BODS is because, according to the datasheet, the brownout disable only lasts for 3 clock cycles. So calling noInterrupts () guarantees that no cycles will be "wasted" on an interrupt before the CPU goes to sleep. You can then call interrupts () right before sleep since the ISR first calls the next instruction (which is sleep) before executing the interrupt, you are safe anyway.

Please correct me if I am wrong.

If that's the case, why don't I see anyone calling noInterrupts () before setting the WDT?
Since the datasheet also states that in order to set or change the WDT register you must first

WDTCSR = bit (WDCE) | bit (WDE);

and within 4 clock cycles, you must do your selection - bit (WDCE) only remains active for 4 cycles. Isn't noInterrupts () necessary for this as well?

Thanks

See the datasheet regarding the BOD and WDT configuration - these are timed write operations, where you need to set one bit in the register, and then within 4 clock cycles, set the desired bit. So, you need to disable interrupts- otherwise the millis timer interrupt (or some other interrupt) could fire between these two operations, so that the second write would fail because it would no longer be happening within 4 clocks of the first.

So, you disable interrupts (I usually save th was SREG value, cli() and then restore it when done instead of using noInterrupts() and Interrupts() - this let's the same code work even if it's called when interrupts were already disabled, and leave interrupts in whatever state they were begore)

Thanks for the reply. But my question was why nickgammon uses the noInterrupts() only by BODS and not by the WDT if BOTH are timed operations. is there a difference? fluke or not necessary for some reason?
see the code I posted above

I would assess that as a bug in his code.

or it could be because BODS is timed for only 3 clock cycles whereas WDCE for 4 cycles so you are not as likely to miss the 4 cycle deadline if there is some interrupt...Just saying