This is the mail archive of the gcc@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: Patch to allow strlen expander to fail


> 
> 
>   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


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