$ 3.6.1 / 3 condition -
"The main function should not be used (3.2) inside the program.".
The example of an academically motivated program below uses the name "main" in several ways, which I thought were legal. This is based on the assumption that “using a function” is associated with a function call (directly / indirectly).
struct MyClass{
private:
MyClass(){}
friend int main();
};
int main(){
MyClass m;
int (*p)() = main;
}
Comeau online gives an error when declaring 'p' (that is, when referring to "main"), but not when declaring "main" as a friend.
Who / What is correct regarding C ++ 03?