This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Patch to allow strlen expander to fail
- To: law at cygnus dot com
- Subject: Re: Patch to allow strlen expander to fail
- From: Toshiyasu Morita <tm at netcom dot com>
- Date: Fri, 10 Mar 2000 12:44:15 -0800 (PST)
- Cc: gcc at gcc dot gnu dot org
>
>
> In message <20000310090713.A20157@celes.dgate.ORG>you write:
> > And then spake Clinton Popetz, as follows:
(stuff deleted)
> > Additionally, I had sent in a bug report about -ffreestanding not
> > affecting gcc's normal behavior of trying to call hosted C-runtime
> > stuff from main() (__main(), etc) using egcs 1.1.1 targetting mips. I
> > found this behavior when trying to compile test cases for a MIPS virtual
> > machine simulator I was writing. I still think this behavior is wrong.
> > I haven't tested to see whether it exists in the latest snaps, though
> > from the above discussion I am assuming things haven't changed much...
> > anyway, if people are going to be hacking on -ffreestanding, it's probably
> > a good loose end to tie up.
> The __main is not a hosted vs non-hosted issue -- the behavior of the
> compiler is correct. __main is critical for the proper behavior of ctors/dtors
> which are 100% independent of the hosted vs non-hosted environment.
>
> -ffreestanding does not and will not ever control the call to __main.
>
> jeff
>
>
I have a patch which suppresses the call to __main in main...would other
people be interested in this patch? If so, i can submit it for inclusion.
Toshi