X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=gdb%2Fada-lex.l;h=d64496a3775ac7a2b94ceaf1fdbf83c156cb0be7;hb=e05523bd2411bac0277da73556f4d01f6c7448aa;hp=f7fac27410edf683594e528252a91dbe603dd73c;hpb=5776fca307b8af3d852525b77e9b917a9aa97370;p=binutils-gdb.git diff --git a/gdb/ada-lex.l b/gdb/ada-lex.l index f7fac27410e..d64496a3775 100644 --- a/gdb/ada-lex.l +++ b/gdb/ada-lex.l @@ -1,5 +1,5 @@ /* FLEX lexer for Ada expressions, for GDB. - Copyright (C) 1994-2019 Free Software Foundation, Inc. + Copyright (C) 1994-2022 Free Software Foundation, Inc. This file is part of GDB. @@ -45,7 +45,9 @@ POSEXP (e"+"?{NUM10}) /* 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 @@ -89,7 +91,7 @@ static int paren_depth; %} -%option case-insensitive interactive nodefault +%option case-insensitive interactive nodefault noyywrap %s BEFORE_QUAL_QUOTE @@ -216,7 +218,7 @@ false { return FALSEKEYWORD; } /* ATTRIBUTES */ -{TICK}[a-zA-Z][a-zA-Z]+ { BEGIN INITIAL; return processAttribute (yytext+1); } +{TICK}[a-zA-Z][a-zA-Z_]+ { BEGIN INITIAL; return processAttribute (yytext+1); } /* PUNCTUATION */ @@ -634,12 +636,6 @@ rewind_to_char (int ch) yyrestart (NULL); } -int -yywrap(void) -{ - return 1; -} - /* Dummy definition to suppress warnings about unused static definitions. */ typedef void (*dummy_function) (); dummy_function ada_flex_use[] =