[Bug 224326] double subnormals are not well printed on printing with printf (and friends)
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 13 Oct 2021 19:29:56 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=224326
--- Comment #8 from Mark Millard <marklmi26-fbsd@yahoo.com> ---
(In reply to Luis Colorado from comment #0)
On/for armv7, for compiling/linking the test program via
any of:
system clang (so: 12)
clang13 (from devel/llvm13)
gcc11 (from lang/gcc11)
and then running the test, all produce the e-308 "from here
on, all are incorrect" type of results.
Side note:
For reference,
# gcc11 -O2 -pedantic -Wall subnormal_test.c
subnormal_test.c: In function 'main':
subnormal_test.c:10:49: warning: dereferencing type-punned pointer will break
strict-aliasing rules [-Wstrict-aliasing]
10 | printf("0x%016llx %-0.17lg\n", *(unsigned long long
*)&val, val);
|
^~~~~~~~~~~~~~~~~~~~~~~~~~
subnormal_test.c:10:24: warning: '0' flag ignored with '-' flag in gnu_printf
format [-Wformat=]
10 | printf("0x%016llx %-0.17lg\n", *(unsigned long long
*)&val, val);
| ^~~~~~~~~~~~~~~~~~~~~~
and:
# clang13 -O2 -pedantic -Wall subnormal_test.c
subnormal_test.c:10:23: warning: flag '0' is ignored when flag '-' is present
[-Wformat]
printf("0x%016llx %-0.17lg\n", *(unsigned long long *)&val,
val);
~~^~~~~~
--
You are receiving this mail because:
You are the assignee for the bug.