From 7188542155902bcf3880d482d472e91331f8a3ed Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Sun, 20 Apr 2014 14:28:23 +0200 Subject: [PATCH] Fixed clang -Wdeprecated-register warnings --- frontends/ilang/lexer.l | 7 +++++++ frontends/verilog/lexer.l | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/frontends/ilang/lexer.l b/frontends/ilang/lexer.l index 000919275..6557f98ab 100644 --- a/frontends/ilang/lexer.l +++ b/frontends/ilang/lexer.l @@ -23,9 +23,16 @@ */ %{ + +#ifdef __clang__ +// bison generates code using the 'register' storage class specifier +#pragma clang diagnostic ignored "-Wdeprecated-register" +#endif + #include "kernel/rtlil.h" #include "parser.tab.h" void update_autoidx(const char *p); + %} %option yylineno diff --git a/frontends/verilog/lexer.l b/frontends/verilog/lexer.l index e3e5e4ab2..226a26709 100644 --- a/frontends/verilog/lexer.l +++ b/frontends/verilog/lexer.l @@ -34,6 +34,11 @@ %{ +#ifdef __clang__ +// bison generates code using the 'register' storage class specifier +#pragma clang diagnostic ignored "-Wdeprecated-register" +#endif + #include "kernel/log.h" #include "verilog_frontend.h" #include "frontends/ast/ast.h" -- 2.30.2