Patch to allow strlen expander to fail

Toon Moene toon@moene.indiv.nluug.nl
Tue Mar 7 13:20:00 GMT 2000


Martin v. Loewis wrote:

> I can't see how linking libgcc helps; it does not provide a version of
> memcpy, either. GCC currently assumes that the programs it generates
> will be linked with the system's standard C library; that assumption
> is incorrect for a freestanding environment. 

Well, that's great, but the C Standard only asserts that there are two
execution environments defined - it doesn't say how a particular
compiler discerns whether it is compiling for one or the other
environment.

I think this can only be solved by having a compile time switch that
makes clear which of the two environments one compiles for.  It's
amazing to me that a compiler that's used so much in the embedded
community, doesn't even _have_ -hosted and -freestanding options.

-- 
Toon Moene (toon@moene.indiv.nluug.nl)
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
Phone: +31 346 214290; Fax: +31 346 214286
GNU Fortran: http://gcc.gnu.org/onlinedocs/g77_news.html


More information about the Gcc mailing list