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.
+2020-08-21  Mark Wielaard  <mark@klomp.org>
+
+       * ada-lex.l: Extend register warnings diagnostics comment for g++.
+
 2020-08-22  Simon Marchi  <simon.marchi@efficios.com>
 
        * frame.c (enum class frame_id_status): New.
 
 
 /* Some old versions of flex generate code that uses the "register" keyword,
    which clang warns about.  This was observed for example with flex 2.5.35,
-   as shipped with macOS 10.12.  */
+   as shipped with macOS 10.12.  The same happens with flex 2.5.37 and g++ 11
+   which defaults to ISO C++17, that does not allow register storage class
+   specifiers.  */
 DIAGNOSTIC_PUSH
 DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER
 
 
+2020-08-21  Mark Wielaard  <mark@klomp.org>
+
+       * diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER): Also define
+       for GCC 7.0 or higher.
+
 2020-08-10  Alex Coplan  <alex.coplan@arm.com>
 
        * opcode/aarch64.h (AARCH64_MAX_SYSREG_NAME_LEN): New.
 
 
 #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")