On Tue, Apr 28, 2015 at 07:19:02PM +0300, Kalle Valo wrote:
> Rasmus Villemoes 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
Rasmus Villemoes 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 point in having three
On Fri, Feb 13 2015, David Laight 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
>> language lawye
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[] =
On Fri, Feb 13 2015, Mark Rustad wrote:
> 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
-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
> de
On Thu, Feb 12 2015, "Rustad, Mark D" wrote:
> On Feb 11, 2015, at 2:51 PM, Rasmus Villemoes
> 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 functions. Since the linker knows per
On Feb 11, 2015, at 2:51 PM, Rasmus Villemoes 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 functions. Since the linker knows perfectly well to merge
> identical string constants, there
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 gi