Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Oct 2021 19:29:56 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 224326] double subnormals are not well printed on printing with printf (and friends)
Message-ID:  <bug-224326-227-Vw4W6oF9Fw@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-224326-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-224326-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D224326

--- 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 bre=
ak
strict-aliasing rules [-Wstrict-aliasing]
   10 |                 printf("0x%016llx %-0.17lg\n", *(unsigned long long
*)&val, val);
      |=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20
^~~~~~~~~~~~~~~~~~~~~~~~~~
subnormal_test.c:10:24: warning: '0' flag ignored with '-' flag in gnu_prin=
tf
format [-Wformat=3D]
   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 prese=
nt
[-Wformat]
                printf("0x%016llx %-0.17lg\n", *(unsigned long long *)&val,
val);
                                  ~~^~~~~~

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-224326-227-Vw4W6oF9Fw>