unsigned long overflow?

Why would this:

unsigned long delayHeartBeat = (5 * 60 * 1000); // 5 minutes.

void setup() {
  // put your setup code here, to run once:

}

void loop() {
  // put your main code here, to run repeatedly:

}

generate this:

C:\temp\test\test.ino:1:42: warning: integer overflow in expression [-Woverflow]

 unsigned long delayHeartBeat = (5 * 60 * 1000); // 5 minutes.

Compiled for 5v 16mhz Arduino ProMini

Because all operands in the constant expression are ints. Make one a long (5 * 60 * 1000L).

Because it first does the math and then tries to assign it to the unsigned long. And because 5, 60 and 1000 all fit into an int the compiler will use it's default, an int. Try

unsigned long delayHeartBeat = 5 * 60 * 1000UL;

Thank you -- I totally missed it; now that you pointed it out; it seems obvious.