is valid C/C++ as one is allowed to use the name of the function in expressions.
There are code tool checkers like - lint (?) - that detect the "wrong" usages as in your sample.
The name of a function is a pointer to its start point in memory
This allows you to make arrays of functions which can be used e.g. in a menu system.
Or determine the size (to some extend, not trivial to do right)
Serial.println( (char*) setup - (char*) loop);
which is about the size of loop in bytes.