On Thu, 4 Oct 2007, Dirk Mueller wrote:

> My primary concern was to ensure that no format string mismatches occur that
> could cause strange misbehaviour or crashes on rare (possible not regression
> tested) scenarios.

I've been annoyed several times in my recent Massif2 work with incorrect 
format strings, so automatic checking is good.

>> , but then the ',' prefix is also
>> extremely useful -- it inserts commas into printed numbers, eg. prints
>> "1,234,567" instead of "1234567".  Any ideas for how to get the best of
>> both worlds?
>
> There is one death to die. For now, we can keep the ',' prefix as long as gcc
> does not complain about it. Otherwise we have to either overload the meaning
> of one of the ANSI format string characters with it - e.g. '00' could mean
> comma insertion instead of zero extension, or remove the flag alltogether.
>
> the only fully ANSI correct solution would be to use %s and wrap the actual
> integer in a "comma_convert_decimal()" helper routine which formats the
> number and returns a pointer to a string instead.

It sounds like changing it from a ',' to an apostrophe will fix any problem 
there.  Dirk, are you happy to make that change along with the others in 
the branch?  The relevant code is in coregrind/m_debuglog.c.

Nick

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Valgrind-developers mailing list
Valgrind-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-developers

Reply via email to