This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix pt.c bootstrap breakage
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: David Edelsohn <dje dot gcc at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Jason Merrill <jason at redhat dot com>, Jakub Jelinek <jakub at redhat dot com>, Martin Sebor <msebor at gmail dot com>
- Date: Wed, 28 Feb 2018 11:21:02 +0100
- Subject: Re: [PATCH] Fix pt.c bootstrap breakage
- Authentication-results: sourceware.org; auth=none
- References: <CAGWvnyky17rtN9iQCeJ=FF1kGb+WSHQL39R-pwbZNLnLExXn-w@mail.gmail.com>
On Wed, Feb 28, 2018 at 12:27 AM, David Edelsohn <dje.gcc@gmail.com> wrote:
> The recent change to pt.c broke bootstrap by including C++ header file
> <string> directly and including it first. This patch changes to the
> necessary method which includes the header file via system.h.
>
> Okay?
Ok. But in reality nobody should use std::string ...
> Thanks, David
>
> * pt.c: Don't include string. Define INCLUDE_STRING before system.h.
>
> Index: pt.c
> ===================================================================
> --- pt.c (revision 258045)
> +++ pt.c (working copy)
> @@ -24,8 +24,8 @@
> all methods must be provided in header files; can't use a source
> file that contains only the method templates and "just win". */
>
> -#include <string>
> #include "config.h"
> +#define INCLUDE_STRING
> #include "system.h"
> #include "coretypes.h"
> #include "cp-tree.h"