[Bug 224326] double subnormals are not well printed on printing with printf (and friends)

From: <bugzilla-noreply_at_freebsd.org>
Date: Wed, 13 Oct 2021 19:29:56 UTC

--- 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);
      |                        ^~~~~~~~~~~~~~~~~~~~~~


# clang13 -O2 -pedantic -Wall subnormal_test.c
subnormal_test.c:10:23: warning: flag '0' is ignored when flag '-' is present
                printf("0x%016llx %-0.17lg\n", *(unsigned long long *)&val,

You are receiving this mail because:
You are the assignee for the bug.