How to only require setup()

When we write:

void setup(){
}

void loop(){
}

Both setup and loop will be defined for the preprocessor, as in: 'It knows of setup and loop'

My code ask the preprocessor:

Do you know about loop?
If you do, execute it. But if you do no know about loop, do not try to execute it.

This way, we can omit the void loop() altogether in the Arduino IDE, and the compiler won't complain.

(Without the #ifdef the compiler would expect a function called loop to be defined and available.)