Rasmus Villemoes li...@rasmusvillemoes.dk writes:
Since these fmt_* variables are just const char*, and not const
char[], gcc (and smatch) doesn't to type checking of the arguments to
the printf functions. Since the linker knows perfectly well to merge
identical string constants, there's no
On Tue, Apr 28, 2015 at 07:19:02PM +0300, Kalle Valo wrote:
Rasmus Villemoes li...@rasmusvillemoes.dk writes:
Since these fmt_* variables are just const char*, and not const
char[], gcc (and smatch) doesn't to type checking of the arguments to
the printf functions. Since the linker knows
From: Rasmus Villemoes
Well, probably the linker is allowed to overlap anonymous objects
(string literals) with whatever const char[] (or indeed any const)
object it finds containing the appropriate byte sequence. But I think
language lawyers would insist that for
const char foo[] = a
On Fri, Feb 13 2015, David Laight david.lai...@aculab.com wrote:
From: Rasmus Villemoes
Well, probably the linker is allowed to overlap anonymous objects
(string literals) with whatever const char[] (or indeed any const)
object it finds containing the appropriate byte sequence. But I think
On Thu, Feb 12 2015, Rustad, Mark D mark.d.rus...@intel.com wrote:
On Feb 11, 2015, at 2:51 PM, Rasmus Villemoes li...@rasmusvillemoes.dk
wrote:
Since these fmt_* variables are just const char*, and not const
char[], gcc (and smatch) doesn't to type checking of the arguments to
the printf
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 2/12/15 2:20 AM, Rasmus Villemoes wrote:
Rather weak arguments, but I have three of them :-)
Yes, weak. All three.
(1) If I'm reading some code and spot a non-constant format
argument, I sometimes track back to see how e.g. fmt_value is
Since these fmt_* variables are just const char*, and not const
char[], gcc (and smatch) doesn't to type checking of the arguments to
the printf functions. Since the linker knows perfectly well to merge
identical string constants, there's no point in having three static
pointers waste memory and