Message ID | CBA3A4A7-CFF5-448B-9990-CB1A69EC71A4@bell.net |
---|---|
State | New |
Headers | show |
On Tue, May 17, 2016 at 08:31:00PM -0400, John David Anglin wrote: > r235550 introduced the use of long long, and the macros LLONG_MIN and LLONG_MAX. These macros > are not defined by default and we need to include <climits> when compiling with c++ to define them. IMNSHO we should get rid of those long long uses instead and just use int64_t and INTTYPE_MINIMUM (int64_t) and INTTYPE_MAXIMUM (int64_t). There is also another use of long long in libcpp, we should also replace that. > 2016-05-17 John David Anglin <danglin@gcc.gnu.org> > > PR bootstrap/71014 > * system.h: Include climits instead of limits.h when compiling with c++. > > Index: system.h > =================================================================== > --- system.h (revision 236287) > +++ system.h (working copy) > @@ -301,8 +301,12 @@ > # undef m_slot > #endif > > -#if HAVE_LIMITS_H > -# include <limits.h> > +#ifdef __cplusplus > +# include <climits> > +#else > +# if HAVE_LIMITS_H > +# include <limits.h> > +# endif > #endif > > /* A macro to determine whether a VALUE lies inclusively within a Jakub
Index: system.h =================================================================== --- system.h (revision 236287) +++ system.h (working copy) @@ -301,8 +301,12 @@ # undef m_slot #endif -#if HAVE_LIMITS_H -# include <limits.h> +#ifdef __cplusplus +# include <climits> +#else +# if HAVE_LIMITS_H +# include <limits.h> +# endif #endif /* A macro to determine whether a VALUE lies inclusively within a