summaryrefslogtreecommitdiff
path: root/gcc/ada/namet.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2010-09-09 09:44:34 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2010-09-09 09:44:34 +0000
commit6797073fef956e34c8d6c470c90d4c2841090c7c (patch)
tree076b2e23e245fd1f10b39412c01d91d898d23801 /gcc/ada/namet.adb
parent3638f03ec550a6a943589884f9466da8f60df872 (diff)
downloadgcc-6797073fef956e34c8d6c470c90d4c2841090c7c.tar.gz
2010-09-09 Robert Dewar <dewar@adacore.com>
* a-calfor.adb, sem_ch3.adb: Minor reformatting. 2010-09-09 Robert Dewar <dewar@adacore.com> * bindgen.adb (Gen_Restrictions_Ada): Avoid explicit enumeration ranges (Gen_Restrictions_C): Avoid explicit enumeration ranges (Set_String_Replace): New procedure * casing.ads (Known_Casing): New subtype declaration * prj-attr.ads (All_Case_Insensitive_Associative_Array): New subtype declaration * prj-dect.adb (Parse_Attribute_Declaration): Avoid enumeration range * prj-nmsc.adb (Check_Naming): Avoid unnecessary enumeration range * prj-strt.adb (Attribute_Reference): Avoid enumeration range test * prj.adb (Known_Casing): Moved to Casing spec (avoid enum range) * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order): Avoid enumeration ranges * sem_res.adb (Resolve_Range): Check for enumeration subrange style rule * sem_type.adb (Is_Array_Class_Record_Type): New. * style.ads (Check_Enumeration_Subrange): New procedure * styleg.adb (Check_Enumeration_Subrange): New procedure * styleg.ads (Check_Enumeration_Subrange): New procedure * stylesw.adb Add handling for Style_Check_Enumeration_Subranges * stylesw.ads (Style_Check_Enumeration_Subranges): New flag * usage.adb: Add line for -gnatyE * vms_data.ads: Add entries for [NO]ENUMERATION_RANGES Add missing entry for NOBOOLEAN_OPERATORS * gnat_ugn.texi: Add documentation for -gnatyE 2010-09-09 Robert Dewar <dewar@adacore.com> * namet.adb (Initialize): Is now a dummy procedure (Reinitialize): New procedure Call Reinitialize from package initialization * namet.ads (Initialize): Is now a dummy procedure (Reinitialize): New procedure * clean.adb, gnat1drv.adb, gnatbind.adb, gnatcmd.adb, gnatlink.adb, gnatls.adb, gprep.adb, make.adb, prj-makr.adb: Remove obsolete call to Namet.Initialize. 2010-09-09 Bob Duff <duff@adacore.com> * sem_elab.adb, s-os_lib.ads: Minor comment fixes. 2010-09-09 Robert Dewar <dewar@adacore.com> * s-bitops.adb (Raise_Error): Add exception message git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164058 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/namet.adb')
-rw-r--r--gcc/ada/namet.adb61
1 files changed, 37 insertions, 24 deletions
diff --git a/gcc/ada/namet.adb b/gcc/ada/namet.adb
index 799e48662ba..d13918cd60a 100644
--- a/gcc/ada/namet.adb
+++ b/gcc/ada/namet.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2009, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2010, 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- --
@@ -864,29 +864,7 @@ package body Namet is
procedure Initialize is
begin
- Name_Chars.Init;
- Name_Entries.Init;
-
- -- Initialize entries for one character names
-
- for C in Character loop
- Name_Entries.Append
- ((Name_Chars_Index => Name_Chars.Last,
- Name_Len => 1,
- Byte_Info => 0,
- Int_Info => 0,
- Name_Has_No_Encodings => True,
- Hash_Link => No_Name));
-
- Name_Chars.Append (C);
- Name_Chars.Append (ASCII.NUL);
- end loop;
-
- -- Clear hash table
-
- for J in Hash_Index_Type loop
- Hash_Table (J) := No_Name;
- end loop;
+ null;
end Initialize;
----------------------
@@ -1133,6 +1111,37 @@ package body Namet is
end if;
end Name_Find;
+ ------------------
+ -- Reinitialize --
+ ------------------
+
+ procedure Reinitialize is
+ begin
+ Name_Chars.Init;
+ Name_Entries.Init;
+
+ -- Initialize entries for one character names
+
+ for C in Character loop
+ Name_Entries.Append
+ ((Name_Chars_Index => Name_Chars.Last,
+ Name_Len => 1,
+ Byte_Info => 0,
+ Int_Info => 0,
+ Name_Has_No_Encodings => True,
+ Hash_Link => No_Name));
+
+ Name_Chars.Append (C);
+ Name_Chars.Append (ASCII.NUL);
+ end loop;
+
+ -- Clear hash table
+
+ for J in Hash_Index_Type loop
+ Hash_Table (J) := No_Name;
+ end loop;
+ end Reinitialize;
+
----------------------
-- Reset_Name_Table --
----------------------
@@ -1399,4 +1408,8 @@ package body Namet is
end if;
end Write_Name_Decoded;
+-- Package initialization, initialize tables
+
+begin
+ Reinitialize;
end Namet;