Date: Fri, 20 Jan 2012 06:51:41 +0000 (UTC) From: David Schultz <das@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r230366 - in head/sys: arm/include ia64/include mips/include powerpc/include Message-ID: <201201200651.q0K6pfOe028201@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: das Date: Fri Jan 20 06:51:41 2012 New Revision: 230366 URL: http://svn.freebsd.org/changeset/base/230366 Log: Add parentheses where required. Without them, `sizeof LDBL_MAX' is a syntax error and shouldn't be, while `1 FLT_ROUNDS' isn't a syntax error and should be. Thanks to bde for the examples. Modified: head/sys/arm/include/float.h head/sys/ia64/include/float.h head/sys/mips/include/float.h head/sys/powerpc/include/float.h Modified: head/sys/arm/include/float.h ============================================================================== --- head/sys/arm/include/float.h Fri Jan 20 06:33:49 2012 (r230365) +++ head/sys/arm/include/float.h Fri Jan 20 06:51:41 2012 (r230366) @@ -75,12 +75,12 @@ __END_DECLS #define DBL_MAX_10_EXP 308 #define LDBL_MANT_DIG DBL_MANT_DIG -#define LDBL_EPSILON (long double)DBL_EPSILON +#define LDBL_EPSILON ((long double)DBL_EPSILON) #define LDBL_DIG DBL_DIG #define LDBL_MIN_EXP DBL_MIN_EXP -#define LDBL_MIN (long double)DBL_MIN +#define LDBL_MIN ((long double)DBL_MIN) #define LDBL_MIN_10_EXP DBL_MIN_10_EXP #define LDBL_MAX_EXP DBL_MAX_EXP -#define LDBL_MAX (long double)DBL_MAX +#define LDBL_MAX ((long double)DBL_MAX) #define LDBL_MAX_10_EXP DBL_MAX_10_EXP #endif /* _MACHINE_FLOAT_H_ */ Modified: head/sys/ia64/include/float.h ============================================================================== --- head/sys/ia64/include/float.h Fri Jan 20 06:33:49 2012 (r230365) +++ head/sys/ia64/include/float.h Fri Jan 20 06:51:41 2012 (r230366) @@ -49,9 +49,9 @@ __END_DECLS #define FLT_MANT_DIG 24 /* p */ #define FLT_EPSILON 1.19209290E-07F /* b**(1-p) */ #define FLT_DIG 6 /* floor((p-1)*log10(b))+(b == 10) */ -#define FLT_MIN_EXP -125 /* emin */ +#define FLT_MIN_EXP (-125) /* emin */ #define FLT_MIN 1.17549435E-38F /* b**(emin-1) */ -#define FLT_MIN_10_EXP -37 /* ceil(log10(b**(emin-1))) */ +#define FLT_MIN_10_EXP (-37) /* ceil(log10(b**(emin-1))) */ #define FLT_MAX_EXP 128 /* emax */ #define FLT_MAX 3.40282347E+38F /* (1-b**(-p))*b**emax */ #define FLT_MAX_10_EXP 38 /* floor(log10((1-b**(-p))*b**emax)) */ @@ -59,9 +59,9 @@ __END_DECLS #define DBL_MANT_DIG 53 #define DBL_EPSILON 2.2204460492503131E-16 #define DBL_DIG 15 -#define DBL_MIN_EXP -1021 +#define DBL_MIN_EXP (-1021) #define DBL_MIN 2.2250738585072014E-308 -#define DBL_MIN_10_EXP -307 +#define DBL_MIN_10_EXP (-307) #define DBL_MAX_EXP 1024 #define DBL_MAX 1.7976931348623157E+308 #define DBL_MAX_10_EXP 308 Modified: head/sys/mips/include/float.h ============================================================================== --- head/sys/mips/include/float.h Fri Jan 20 06:33:49 2012 (r230365) +++ head/sys/mips/include/float.h Fri Jan 20 06:51:41 2012 (r230366) @@ -45,7 +45,7 @@ __END_DECLS #ifdef CPU_HAVEFPU #define FLT_ROUNDS __flt_rounds() /* FP addition rounds to nearest */ #else -#define FLT_ROUNDS -1 +#define FLT_ROUNDS (-1) #endif #if __ISO_C_VISIBLE >= 1999 @@ -74,13 +74,13 @@ __END_DECLS #define DBL_MAX_10_EXP 308 #define LDBL_MANT_DIG DBL_MANT_DIG -#define LDBL_EPSILON (long double)DBL_EPSILON +#define LDBL_EPSILON ((long double)DBL_EPSILON) #define LDBL_DIG DBL_DIG #define LDBL_MIN_EXP DBL_MIN_EXP -#define LDBL_MIN (long double)DBL_MIN +#define LDBL_MIN ((long double)DBL_MIN) #define LDBL_MIN_10_EXP DBL_MIN_10_EXP #define LDBL_MAX_EXP DBL_MAX_EXP -#define LDBL_MAX (long double)DBL_MAX +#define LDBL_MAX ((long double)DBL_MAX) #define LDBL_MAX_10_EXP DBL_MAX_10_EXP #endif /* _MACHINE_FLOAT_H_ */ Modified: head/sys/powerpc/include/float.h ============================================================================== --- head/sys/powerpc/include/float.h Fri Jan 20 06:33:49 2012 (r230365) +++ head/sys/powerpc/include/float.h Fri Jan 20 06:51:41 2012 (r230366) @@ -42,7 +42,7 @@ extern int __flt_rounds(void); __END_DECLS #define FLT_ROUNDS __flt_rounds() #else -#define FLT_ROUNDS -1 +#define FLT_ROUNDS (-1) #endif #define FLT_RADIX 2 /* b */ @@ -72,13 +72,13 @@ __END_DECLS #define DBL_MAX_10_EXP 308 #define LDBL_MANT_DIG DBL_MANT_DIG -#define LDBL_EPSILON (long double)DBL_EPSILON +#define LDBL_EPSILON ((long double)DBL_EPSILON) #define LDBL_DIG DBL_DIG #define LDBL_MIN_EXP DBL_MIN_EXP -#define LDBL_MIN (long double)DBL_MIN +#define LDBL_MIN ((long double)DBL_MIN) #define LDBL_MIN_10_EXP DBL_MIN_10_EXP #define LDBL_MAX_EXP DBL_MAX_EXP -#define LDBL_MAX (long double)DBL_MAX +#define LDBL_MAX ((long double)DBL_MAX) #define LDBL_MAX_10_EXP DBL_MAX_10_EXP #endif /* _MACHINE_FLOAT_H_ */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201201200651.q0K6pfOe028201>