This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix bootstrap on hppa*-*-hpux*
- From: Jakub Jelinek <jakub at redhat dot com>
- To: John David Anglin <dave dot anglin at bell dot net>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 18 May 2016 08:20:52 +0200
- Subject: Re: [PATCH] Fix bootstrap on hppa*-*-hpux*
- Authentication-results: sourceware.org; auth=none
- References: <CBA3A4A7-CFF5-448B-9990-CB1A69EC71A4 at bell dot net>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
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