diff options
author | Arnaud Charlet <charlet@adacore.com> | 2023-01-19 13:34:20 +0000 |
---|---|---|
committer | Marc Poulhiès <poulhies@adacore.com> | 2023-05-16 10:30:56 +0200 |
commit | 05c1e15f9faad6c59c8e82e665c7cbcf8b8d7a40 (patch) | |
tree | 86bde7079990d63bee40147bc6e9da86bf13e348 /gcc/ada | |
parent | 4b8f39b21e27919c6de00e65b0ba29222c057d26 (diff) | |
download | gcc-05c1e15f9faad6c59c8e82e665c7cbcf8b8d7a40.zip gcc-05c1e15f9faad6c59c8e82e665c7cbcf8b8d7a40.tar.gz gcc-05c1e15f9faad6c59c8e82e665c7cbcf8b8d7a40.tar.bz2 |
ada: Bad handling of ASCII with -gnatyn
ASCII is special cased but this wasn't taking into account all cases
such as Standard.ASCII.
gcc/ada/
* snames.ads-tmpl (Name_ASCII): New.
* style.adb (Check_Identifier): Fix handling of ASCII.
Diffstat (limited to 'gcc/ada')
-rw-r--r-- | gcc/ada/snames.ads-tmpl | 1 | ||||
-rw-r--r-- | gcc/ada/style.adb | 5 |
2 files changed, 3 insertions, 3 deletions
diff --git a/gcc/ada/snames.ads-tmpl b/gcc/ada/snames.ads-tmpl index 8f71ad9..afe7508 100644 --- a/gcc/ada/snames.ads-tmpl +++ b/gcc/ada/snames.ads-tmpl @@ -260,6 +260,7 @@ package Snames is -- Some miscellaneous names used for error detection/recovery + Name_ASCII : constant Name_Id := N + $; Name_Const : constant Name_Id := N + $; Name_Error : constant Name_Id := N + $; Name_False : constant Name_Id := N + $; diff --git a/gcc/ada/style.adb b/gcc/ada/style.adb index 3014359..dda5cd4 100644 --- a/gcc/ada/style.adb +++ b/gcc/ada/style.adb @@ -35,9 +35,8 @@ with Nlists; use Nlists; with Opt; use Opt; with Sinfo; use Sinfo; with Sinfo.Nodes; use Sinfo.Nodes; -with Sinfo.Utils; use Sinfo.Utils; with Sinput; use Sinput; -with Stand; use Stand; +with Snames; use Snames; with Stylesw; use Stylesw; package body Style is @@ -201,7 +200,7 @@ package body Style is else -- ASCII is all upper case - if Entity (Ref) = Standard_ASCII then + if Chars (Ref) = Name_ASCII then Cas := All_Upper_Case; -- Special handling for names in package ASCII |