This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Issue with main function expansion and Ada
- From: Mike Stump <mrs at apple dot com>
- To: Nicolas Roche <roche at adacore dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 27 Mar 2006 17:19:48 -0800
- Subject: Re: Issue with main function expansion and Ada
- References: <4423DAB1.2080303@adacore.com> <F3069C99-E638-4A3F-82A5-FC526F70A25E@apple.com> <4427BE70.9020101@adacore.com>
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.