This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] Fix a missing include of <string>
- From: Richard Sandiford <richard dot sandiford at arm dot com>
- To: Martin Liška <mliska at suse dot cz>
- Cc: Binutils <binutils at sourceware dot org>
- Date: Mon, 10 Jun 2019 10:11:56 +0100
- Subject: Re: [PATCH] Fix a missing include of <string>
- References: <790a2269-494e-a6b8-8c05-977689c4b175@suse.cz>
Martin Liška <mliska@suse.cz> writes:
> Hi.
>
> Since GCC revision r272011 I see following error:
>
> make[9]: Entering directory '/home/marxin/Programming/binutils/gdb/gdbserver/build-gnulib-gdbserver/import'
> In file included from debug.h:29,
> from dirsearch.cc:31:
> errors.h:87:50: error: ‘string’ in namespace ‘std’ does not name a type
> 87 | undefined_symbol(const Symbol* sym, const std::string& location);
> | ^~~~~~
> errors.h:29:1: note: ‘std::string’ is defined in header ‘<string>’; did you forget to ‘#include <string>’?
> 28 | #include "gold-threads.h"
> +++ |+#include <string>
> 29 |
>
> The patch is fixing that.
>
> Ready for trunk?
> Thanks,
> Martin
>
> From cacc480584d4316ec7322618e4435f6a0faab9f2 Mon Sep 17 00:00:00 2001
> From: Martin Liska <mliska@suse.cz>
> Date: Fri, 7 Jun 2019 07:36:52 +0200
> Subject: [PATCH] Fix a missing include of <string>
>
> gold/ChangeLog:
>
> 2019-06-07 Martin Liska <mliska@suse.cz>
>
> * errors.h: Include string.
OK, thanks.
Richard
> ---
> gold/errors.h | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/gold/errors.h b/gold/errors.h
> index c26b558637..ac681e965b 100644
> --- a/gold/errors.h
> +++ b/gold/errors.h
> @@ -24,6 +24,7 @@
> #define GOLD_ERRORS_H
>
> #include <cstdarg>
> +#include <string>
>
> #include "gold-threads.h"