summaryrefslogtreecommitdiff
path: root/gcc/ada/xsnames.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2007-12-13 10:40:58 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2007-12-13 10:40:58 +0000
commit4a172c0c16c3dea8971ee5eb1505d3c46ecb52d7 (patch)
treeb53100b51497dede67b8a55f080645b76ff2bad0 /gcc/ada/xsnames.adb
parent8cb24ee7b48602e38439c174552e41f65088d50a (diff)
downloadgcc-4a172c0c16c3dea8971ee5eb1505d3c46ecb52d7.tar.gz
2007-12-06 Robert Dewar <dewar@adacore.com>
* xeinfo.adb: Remove warnings * xnmake.adb: Remove warnings * xsinfo.adb: Remove warnings * xtreeprs.adb: Remove warnings * xsnames.adb: Remove warnings * a-ngcoar.adb: Fix typo. * s-interr.adb: Minor reformatting * env.c: Minor reformatting. * g-bytswa.adb: Minor reformatting. * g-rannum.ads: Minor documentation improvements * s-tasinf-mingw.adb: Minor header fix * a-clrefi.adb: Minor reformatting * g-sttsne.ads: Minor documentation improvement * g-sttsne-locking.ads: Minor documentation improvement * g-soliop-solaris.ads: Minor documentation improvement * g-soliop-mingw.ads: Minor documentation improvement * g-soliop.ads: Minor documentation improvement * exp_aggr.ads: Minor reformatting * debug.adb: Add documentation for the gprbuild debug flags * exp_ch2.adb: Use Nkind_In to simplify code throughout * exp_pakd.adb: Minor reformatting * g-altive.ads, g-alleve.adb: Remove assertions. Add comment about minor differences between targets regarding floating-point operations. * g-thread.adb: Remove pragma unreferenced. * lib.ads: Minor reformatting * par-ch9.adb: Minor reformatting of error messages * sem_case.adb: Minor reformatting * s-fileio.adb: Minor reformattinng * s-vmexta.ads: Minor typo * vxaddr2line.adb: Take into account 'Success' value as per new GNAT warning. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@130870 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/xsnames.adb')
-rw-r--r--gcc/ada/xsnames.adb56
1 files changed, 32 insertions, 24 deletions
diff --git a/gcc/ada/xsnames.adb b/gcc/ada/xsnames.adb
index 204aff98690..4e5ea56b93c 100644
--- a/gcc/ada/xsnames.adb
+++ b/gcc/ada/xsnames.adb
@@ -47,43 +47,48 @@ procedure XSnames is
InH : File_Type;
OutH : File_Type;
- A, B : VString := Nul;
- Line : VString := Nul;
- Name : VString := Nul;
- Name1 : VString := Nul;
- Oname : VString := Nul;
- Oval : VString := Nul;
- Restl : VString := Nul;
+ pragma Warnings (Off);
+ -- Variables below are modifed by * operator
- Tdigs : Pattern := Any (Decimal_Digit_Set) &
- Any (Decimal_Digit_Set) &
- Any (Decimal_Digit_Set);
+ A, B : VString := Nul;
+ Line : VString := Nul;
+ Name : VString := Nul;
+ Name1 : VString := Nul;
+ Oname : VString := Nul;
+ Oval : VString := Nul;
+ Restl : VString := Nul;
- Name_Ref : Pattern := Span (' ') * A & Break (' ') * Name
- & Span (' ') * B
- & ": constant Name_Id := N + " & Tdigs
- & ';' & Rest * Restl;
+ pragma Warnings (On);
- Get_Name : Pattern := "Name_" & Rest * Name1;
+ Tdigs : constant Pattern := Any (Decimal_Digit_Set) &
+ Any (Decimal_Digit_Set) &
+ Any (Decimal_Digit_Set);
- Chk_Low : Pattern := Pos (0) & Any (Lower_Set) & Rest & Pos (1);
+ Name_Ref : constant Pattern := Span (' ') * A & Break (' ') * Name
+ & Span (' ') * B
+ & ": constant Name_Id := N + " & Tdigs
+ & ';' & Rest * Restl;
- Findu : Pattern := Span ('u') * A;
+ Get_Name : constant Pattern := "Name_" & Rest * Name1;
+ Chk_Low : constant Pattern := Pos (0) & Any (Lower_Set) & Rest & Pos (1);
+ Findu : constant Pattern := Span ('u') * A;
Val : Natural;
- Xlate_U_Und : Character_Mapping := To_Mapping ("u", "_");
+ Xlate_U_Und : constant Character_Mapping := To_Mapping ("u", "_");
M : Match_Result;
type Header_Symbol is (None, Attr, Conv, Prag);
-- A symbol in the header file
- -- Prefixes used in the header file
+ procedure Output_Header_Line (S : Header_Symbol);
+ -- Output header line
Header_Attr : aliased String := "Attr";
Header_Conv : aliased String := "Convention";
Header_Prag : aliased String := "Pragma";
+ -- Prefixes used in the header file
type String_Ptr is access all String;
Header_Prefix : constant array (Header_Symbol) of String_Ptr :=
@@ -94,9 +99,12 @@ procedure XSnames is
-- Patterns used in the spec file
- Get_Attr : Pattern := Span (' ') & "Attribute_" & Break (",)") * Name1;
- Get_Conv : Pattern := Span (' ') & "Convention_" & Break (",)") * Name1;
- Get_Prag : Pattern := Span (' ') & "Pragma_" & Break (",)") * Name1;
+ Get_Attr : constant Pattern := Span (' ') & "Attribute_"
+ & Break (",)") * Name1;
+ Get_Conv : constant Pattern := Span (' ') & "Convention_"
+ & Break (",)") * Name1;
+ Get_Prag : constant Pattern := Span (' ') & "Pragma_"
+ & Break (",)") * Name1;
type Header_Symbol_Counter is array (Header_Symbol) of Natural;
Header_Counter : Header_Symbol_Counter := (0, 0, 0, 0);
@@ -117,7 +125,7 @@ procedure XSnames is
if Header_Current_Symbol /= S then
declare
- Pat : String := "#define " & Header_Prefix (S).all;
+ Pat : constant String := "#define " & Header_Prefix (S).all;
In_Pat : Boolean := False;
begin
@@ -129,7 +137,7 @@ procedure XSnames is
Line := Get_Line (InH);
if Match (Line, Pat) then
- In_Pat := true;
+ In_Pat := True;
elsif In_Pat then
Header_Pending_Line := Line;
exit;