PATCH: Better MAIN_NAME_P for all C-ish front-ends

Greg McGary greg@mcgary.org
Wed Aug 23 23:44:00 GMT 2000


Mark Mitchell <mark@codesourcery.com> writes:

> Cool.  This patch is OK.
> 
> And note that all the back-ends that use your new macro look broken --
> they are not going to handle 
> 
>   class C { 
>     int main (); 
>   };
> 
> correctly in C++, if a cursory examination is correct.  Not your
> problem -- but suggests that a bit on declarations to say whether or
> not they are the magic global `main' function is probably in order...

OK.  Why don't we just skip my current patch and go to something
that's more correct.  It sounds as though we also want a new macro
MAIN_DECL_P(DECL) that tests for MAIN_NAME_P and that DECL is global
and a FUNCTION_DECL node.  That should suffice, no?


More information about the Gcc-patches mailing list