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

From: Jeremy Fitzhardinge
Date: Fri May 02 2008 - 10:57:53 EST


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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/