public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Floating point conversion warning fixes [v2]
@ 2020-08-21  0:35 Keith Packard
  2020-08-21  0:35 ` [PATCH 1/2] Avoid implicit floating point conversions [v2] Keith Packard
  2020-08-21  0:35 ` [PATCH 2/2] libm/common: Remove unused 'dec' function from sqrtl.c Keith Packard
  0 siblings, 2 replies; 7+ messages in thread
From: Keith Packard @ 2020-08-21  0:35 UTC (permalink / raw)
  To: newlib

Thanks much to both Joseph Myers and C Howland for explaining how the
constants in math.h should be defined and encouraging me to figure out
why clang's builtin classification macros weren't being used.

This series removes all of those changes to math.h and enables the
clang builtins for isinf and friends.

My goal is to be able to compile the math code with -Wdouble-promotion
-Werror=double-promotion which will flag any un-intended use of the
default float promotion rules as an error. This will ensure that
systems with only float acceleration will not accidentally use soft
double code.

This patch only addresses a handful of actual bugs of this form; most
of the changes are to mark places where promotion was intended.

Here are the files with bugs that this patch addresses:

	newlib/libm/common/sf_logb.c
	newlib/libm/complex/cephes_subrf.c
	newlib/libm/math/wf_scalb.c

The rest of the changes serve to quiet the compiler so that those bugs
could be found, and so that future bugs will be caught.



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-08-25 13:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-21  0:35 [PATCH 0/2] Floating point conversion warning fixes [v2] Keith Packard
2020-08-21  0:35 ` [PATCH 1/2] Avoid implicit floating point conversions [v2] Keith Packard
2020-08-24  9:58   ` Corinna Vinschen
2020-08-24 15:33     ` Keith Packard
2020-08-25 11:10       ` Corinna Vinschen
2020-08-25 13:37       ` Thomas Wucher
2020-08-21  0:35 ` [PATCH 2/2] libm/common: Remove unused 'dec' function from sqrtl.c Keith Packard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).