-freestanding not honored

Robert Lipe robertlipe@usa.net
Tue Sep 4 20:02:00 GMT 2001


Compiled with 3.0.1 as of a few days ago for x86, the following program
generates a reference to 'memcpy' even when in freestanding mode.   I'm
thinking it should do that only in hosted mode and generate an inlined
block copy for freestanding, shouldn't it?

$ cc -ffreestanding -O3 -S -o - a.c | grep memcpy
        call    memcpy


typedef struct foo{
        char blah[1024];
} foo_t;
 
extern foo_t one, two;
 
void
foo(void)
{
        one = two;
}



More information about the Gcc-bugs mailing list