diff options
author | Ian Lance Taylor <iant@golang.org> | 2021-09-13 10:37:49 -0700 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2021-09-13 10:37:49 -0700 |
commit | e252b51ccde010cbd2a146485d8045103cd99533 (patch) | |
tree | e060f101cdc32bf5e520de8e5275db9d4236b74c /gcc/ada/scn.adb | |
parent | f10c7c4596dda99d2ee872c995ae4aeda65adbdf (diff) | |
parent | 104c05c5284b7822d770ee51a7d91946c7e56d50 (diff) | |
download | gcc-e252b51ccde010cbd2a146485d8045103cd99533.zip gcc-e252b51ccde010cbd2a146485d8045103cd99533.tar.gz gcc-e252b51ccde010cbd2a146485d8045103cd99533.tar.bz2 |
Merge from trunk revision 104c05c5284b7822d770ee51a7d91946c7e56d50.
Diffstat (limited to 'gcc/ada/scn.adb')
-rw-r--r-- | gcc/ada/scn.adb | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/gcc/ada/scn.adb b/gcc/ada/scn.adb index 408e31f..ad53279 100644 --- a/gcc/ada/scn.adb +++ b/gcc/ada/scn.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -23,16 +23,17 @@ -- -- ------------------------------------------------------------------------------ -with Atree; use Atree; -with Csets; use Csets; -with Namet; use Namet; -with Opt; use Opt; -with Restrict; use Restrict; -with Rident; use Rident; -with Scans; use Scans; -with Sinfo; use Sinfo; -with Sinput; use Sinput; -with Uintp; use Uintp; +with Atree; use Atree; +with Csets; use Csets; +with Namet; use Namet; +with Opt; use Opt; +with Restrict; use Restrict; +with Rident; use Rident; +with Scans; use Scans; +with Sinfo; use Sinfo; +with Sinfo.Nodes; use Sinfo.Nodes; +with Sinput; use Sinput; +with Uintp; use Uintp; package body Scn is @@ -154,7 +155,14 @@ package body Scn is when Tok_Integer_Literal => Token_Node := New_Node (N_Integer_Literal, Token_Ptr); - Set_Intval (Token_Node, Int_Literal_Value); + + -- Int_Literal_Value can be No_Uint in some cases in syntax-only + -- mode (see Scng.Scan.Nlit). + + if Int_Literal_Value /= No_Uint then + Set_Intval (Token_Node, Int_Literal_Value); + end if; + Check_Obsolete_Base_Char; when Tok_String_Literal => |