This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Don't warn about missing noreturn for main


>>>>> "Mark" == Mark Mitchell <mark@codesourcery.com> writes:

> There is at least one technical problem with the patch:

>   - The test you propse isn't strict enough -- in lots of languages
>     things can be named `main' but be in a "namespace" so that they
>     are not *the* main function.  In fact, in some languages the
>     global `main' might not be *the* `main'; checking
>     DECL_ASSEMBLER_NAME might be better, but then you get into
>     issues about leading `_', etc.

Actually, you don't; the leading underscore is added by ASM_OUTPUT_LABELREF
et al.  DECL_ASSEMBLER_NAME should be clean.

Jason

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]