Re: [2.6 patch] kill IN_STRING_C

From: linux-os
Date: Mon Nov 08 2004 - 13:33:33 EST


On Mon, 8 Nov 2004, Andi Kleen wrote:

Rethinking it, I don't even understand the sprintf example in your
changelog entry - shouldn't an inclusion of kernel.h always get it
right?

Newer gcc rewrites sprintf(buf,"%s",str) to strcpy(buf,str) transparently.

-Andi

Hmmm, how does it get the correct return-value and type? I don't
think that a compiler is allowed to change the function(s) called.
If gcc is doing this now, there are many potential problems and
it needs to be fixed. For instance, one can't qualify a
'C' runtime library and then have a compiler decide that it's
not going to call the pre-qualified function.

Cheers,
Dick Johnson
Penguin : Linux version 2.6.9 on an i686 machine (5537.79 BogoMips).
Notice : All mail here is now cached for review by John Ashcroft.
98.36% of all statistics are fiction.
-
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/