From b8fff44e0e2e43e1823413eec7c5f6fa9d219ce7 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Sat, 22 Aug 2020 00:20:55 +0200 Subject: ada-lex.l: Ignore register diagnostic also for g++ defaulting to ISO C++17 Building with a really old flex and a really new g++ is probably not recommended, but it should not cause compile errors. gdb/ChangeLog: * ada-lex.l: Extend register warnings diagnostics comment for g++. include/ChangeLog: * diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER): Also define for GCC version 7.0 or higher. --- include/ChangeLog | 5 +++++ include/diagnostics.h | 5 +++++ 2 files changed, 10 insertions(+) (limited to 'include') diff --git a/include/ChangeLog b/include/ChangeLog index d0475de..53597cf 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,8 @@ +2020-08-21 Mark Wielaard + + * diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER): Also define + for GCC 7.0 or higher. + 2020-08-10 Alex Coplan * opcode/aarch64.h (AARCH64_MAX_SYSREG_NAME_LEN): New. diff --git a/include/diagnostics.h b/include/diagnostics.h index 82d871b..0f0a33c 100644 --- a/include/diagnostics.h +++ b/include/diagnostics.h @@ -63,6 +63,11 @@ #elif defined (__GNUC__) /* GCC */ +# if __GNUC__ >= 7 +# define DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER \ + DIAGNOSTIC_IGNORE ("-Wregister") +# endif + # define DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION \ DIAGNOSTIC_IGNORE ("-Wstringop-truncation") -- cgit v1.1