On Mar 27, 2006, at 2:29 AM, Nicolas Roche wrote:
I just saw that I sent this email to the wrong mailing list. So I reforward to gcc@gcc.gnu.org


Careful; on some systems name it _main. But on others, you don't want _main.

Well it works even in that case as my test was done on Mingw wich use _main and not main.

Try:

main() {
}

_main() {
}

__main() {
}

on arm, and then compile with -fleading-underscore and -fno-leading- underscore and then examine each case by hang. main() should have the call the __main, and none of the others should. Also, the change I imagine your contemplating doesn't handle USER_LABLE_PREFIX set to "foobar", as the assembler name for main would be foobarmain. If you strncmp user_label_prefix and then check main, you'd be set I think.

Reply via email to