[PATCH] Fix 'leading zeros' caveat of StringRef::compare_numeric()
Marshall Clow
mclow.lists at gmail.com
Mon Mar 30 07:43:17 PDT 2015
On Mon, Mar 30, 2015 at 6:26 AM, Sanne Wouda <snnw at gruttepier.net> wrote:
>
> Regarding octal numbers: I believe behaviour is unchanged. Comparison
> between two octal numbers (with or without leading zeroes) should work
> as expected. Exactly which behaviour are you worried about?
>
>
I suspect that Chandler is concerned about these two case giving different
answers:
if ( 010 < 9 ) printf ("true"); // will print.
if ( StringRef("010").compare_numeric("9") < 0 ) printf ("true"); //
will NOT print.
-- Marshall
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150330/82ba68c4/attachment.html>
More information about the llvm-commits
mailing list