Skip to content
Snippets Groups Projects
Verified Commit 38042226 authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Ignore -Wold-style-cast in Flex-generated files

parent 5b729976
Branches
No related tags found
No related merge requests found
...@@ -42,6 +42,9 @@ using token = Dynare::parser::token; ...@@ -42,6 +42,9 @@ using token = Dynare::parser::token;
int comment_caller, line_caller; int comment_caller, line_caller;
string eofbuff; string eofbuff;
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wold-style-cast"
%} %}
%option c++ %option c++
...@@ -1208,6 +1211,8 @@ DATE -?[0-9]+([ya]|m([1-9]|1[0-2])|q[1-4]) ...@@ -1208,6 +1211,8 @@ DATE -?[0-9]+([ya]|m([1-9]|1[0-2])|q[1-4])
<*>. { driver.error(*yylloc, "character unrecognized by lexer"); } <*>. { driver.error(*yylloc, "character unrecognized by lexer"); }
%% %%
#pragma GCC diagnostic pop
DynareFlex::DynareFlex(istream* in, ostream* out) DynareFlex::DynareFlex(istream* in, ostream* out)
: DynareFlexLexer{in, out} : DynareFlexLexer{in, out}
{ {
......
/* -*- C++ -*- */ /* -*- C++ -*- */
/* /*
* Copyright © 2019-2021 Dynare Team * Copyright © 2019-2023 Dynare Team
* *
* This file is part of Dynare. * This file is part of Dynare.
* *
...@@ -35,6 +35,9 @@ using token = Tokenizer::parser::token; ...@@ -35,6 +35,9 @@ using token = Tokenizer::parser::token;
Unfortunately yyterminate by default returns 0, which is Unfortunately yyterminate by default returns 0, which is
not of token_type. */ not of token_type. */
#define yyterminate() return Tokenizer::parser::token_type (0); #define yyterminate() return Tokenizer::parser::token_type (0);
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wold-style-cast"
%} %}
%option c++ %option c++
...@@ -193,6 +196,8 @@ CONT \\\\{SPC}* ...@@ -193,6 +196,8 @@ CONT \\\\{SPC}*
%% %%
#pragma GCC diagnostic pop
void void
TokenizerFlex::location_increment(Tokenizer::parser::location_type *yylloc, const char *yytext) TokenizerFlex::location_increment(Tokenizer::parser::location_type *yylloc, const char *yytext)
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment