This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix up long double fphex


On Sun, Mar 4, 2012 at 15:42, Marek Polacek <polacek@redhat.com> wrote:
> + Âwchar_t a[16 * sizeof (wchar_t)];
> + Âswprintf (a, 16 * sizeof (wchar_t), L"%La\n", x);
> + Âwchar_t A[16 * sizeof (wchar_t)];
> + Âswprintf (A, 16 * sizeof (wchar_t), L"%LA\n", x);
> +
> + Âreturn (wmemcmp (a, L"0xc.4p+1", 8) != 0
> + Â Â Â Â || wmemcmp (A, L"0XC.4P+1", 8) != 0);

These tests are not correct.  The x86/x86-64 instruction uses four
bits for the first digit but that's not guaranteed.  There can be four
different results and they all should be allowed.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]