[cfe-commits] [patch] Fix put_pointer test for glibc

Jeffrey Yasskin jyasskin at gmail.com
Sun Feb 19 09:25:23 PST 2012


I hate to disappoint you, but the standard for sprintf actually says,
"The value of the pointer is converted to a sequence of printing
characters, in an implementation-defined manner.", so there's no
actual list of options to check against beyond what we see
implementations actually doing.

On Sun, Feb 19, 2012 at 3:25 AM, Chandler Carruth <chandlerc at google.com> wrote:
> Personally, I like this patch as it had the test following what is allowed
> by the standard, and enumerating those options explicitly rather than just
> comparing against the libc sprintf output.
>
> On Feb 19, 2012 1:40 AM, "Jeffrey Yasskin" <jyasskin at gmail.com> wrote:
>>
>> Another way to fix this would be to do the sprintf and compare against
>> that, or to use an explicit integer reinterpret_casted to void*, but
>> it doesn't seem too bad to add an extra option for glibc's output.
>>
>> Jeffrey
>>
>> _______________________________________________
>> cfe-commits mailing list
>> cfe-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>>
>



More information about the cfe-commits mailing list