This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 2/2] gdb: Require C++11


Hi Pedro

On Thu, 27 Oct 2016 20:21:34 +0100
Pedro Alves <palves@redhat.com> wrote:

> diff --git a/gdb/configure b/gdb/configure
> index e2d853d..d744f73 100755
> --- a/gdb/configure
> +++ b/gdb/configure
[...]
> @@ -4951,6 +4953,984 @@ ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
[...]
> +// If the compiler admits that it is not ready for C++11, why
> torture it?
> +// Hopefully, this will speed up the test.
> +
> +#ifndef __cplusplus
> +
> +#error "This is not a C++ compiler"
> +
> +#elif __cplusplus < 201103L
> +
> +#error "This is not a C++11 compiler"
> +
> +#else
> +
> +namespace cxx11
> +{
[...]
> +}  // namespace cxx11
> +
> +#endif  // __cplusplus >= 201103L

Without knowing much about autoconf. But you are repeating those
exact 280 lines a total of 6 times in this patch. Isn't there a nicer
way? Like moving it to a function? It would make the path significantly
shorter.

Phil


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]