On Sat, Aug 12, 2017 at 2:53 PM, Ngie Cooper (yaneurabeya) <yaneurab...@gmail.com> wrote: [...] > Here are the full gamut of definitions for LDBL_MAX_EXP. It seems > that sparc64 isn’t the only architecture using this pattern: > > $ grep -r DBL_MAX_EXP sys/*/include > sys/arm/include/float.h:#define DBL_MAX_EXP 1024 > sys/arm/include/float.h:#define LDBL_MAX_EXP DBL_MAX_EXP > sys/arm64/include/float.h:#define DBL_MAX_EXP 1024 > sys/arm64/include/float.h:#define LDBL_MAX_EXP (+16384) > sys/mips/include/float.h:#define DBL_MAX_EXP 1024 > sys/mips/include/float.h:#define LDBL_MAX_EXP DBL_MAX_EXP > sys/powerpc/include/float.h:#define DBL_MAX_EXP 1024 > sys/powerpc/include/float.h:#define LDBL_MAX_EXP DBL_MAX_EXP > sys/riscv/include/float.h:#define DBL_MAX_EXP 1024 > sys/riscv/include/float.h:#define LDBL_MAX_EXP (+16384) > sys/sparc64/include/float.h:#define DBL_MAX_EXP 1024 > sys/sparc64/include/float.h:#define LDBL_MAX_EXP (+16384) > sys/x86/include/float.h:#define DBL_MAX_EXP 1024 > sys/x86/include/float.h:#define LDBL_MAX_EXP 16384 > > It might also be an inconsistency with how clang vs gcc [4.2.1] > handles __CONCAT, and what -std= flags are passed to ${CC} in the Makefile, > since the implementation is predicated by whether or not it’s C++ or __STDC__ > is defined. There might be an update that we can grab from NetBSD (since the > macro originated there). > I don’t understand [right now] why the (+foo) form is used *shrugs*.
Yeah, unsure. Aesthetically it mirrors the declaration for the macros with negative values such as LDBL_MIN_EXP (where the parentheses do have a functional purpose), but in sys/*/include/{_limits.h,_stdint.h} by comparison we don't have parens around the positive values. Anyway maybe the macro pasting method is just too fragile of a hack. _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"