Re: huge gcc 4.1.{0,1} __weak problem

Jeremy Fitzhardinge
2008-05-02T14:57:52Z

Sam Ravnborg wrote:
> OK, can anyone confirm that this fails to build which a
> buggy gcc:
>
>
> void __attribute__((weak)) func(void)
> {
> /* no code */
> }
>
> int main()
> {
> func();
> return 0;
> }
>

I think the problem is that main() would have no call to func(), not
that it wouldn't build.

Does making func noinline fix it? I wonder if we should make __weak
implicitly make the function noinline too.

J