From d1435379df189d1c358ebd9776af8824a9158533 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Mon, 26 Jun 2017 15:08:35 +0200 Subject: ada-lex: Ignore warnings about register keyword Some older versions of flex (such as the one shipped with macOS) generate code that use the register keyword, which clang warns about. This patch makes the compiler ignore those warnings for the portion of the code generated by flex. gdb/ChangeLog: * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER): New macro. * ada-lex.l: Ignore deprecated register warnings. --- gdb/common/diagnostics.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gdb/common') diff --git a/gdb/common/diagnostics.h b/gdb/common/diagnostics.h index 5a63bfd..35bacf2 100644 --- a/gdb/common/diagnostics.h +++ b/gdb/common/diagnostics.h @@ -33,8 +33,11 @@ #ifdef __clang__ # define DIAGNOSTIC_IGNORE_SELF_MOVE DIAGNOSTIC_IGNORE ("-Wself-move") +# define DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER \ + DIAGNOSTIC_IGNORE ("-Wdeprecated-register") #else # define DIAGNOSTIC_IGNORE_SELF_MOVE +# define DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER #endif #endif /* COMMON_DIAGNOSTICS_H */ -- cgit v1.1