summaryrefslogtreecommitdiff
path: root/gcc/ada/makegpr.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2005-01-03 15:36:25 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2005-01-03 15:36:25 +0000
commit81d55fa4ada403b403542a7fcca84790470b790d (patch)
tree0adf4bc70f43fad200dd4b7b096f51a799772df1 /gcc/ada/makegpr.adb
parent62b5359e4e034ec45811dccdd7582bbbd9bc1aac (diff)
downloadgcc-81d55fa4ada403b403542a7fcca84790470b790d.tar.gz
* exp_aggr.adb (Packed_Array_Aggregate_Handled): The values of the
bounds can be negative, and must be declared Int, not Nat. * sem_elim.adb (Line_Num_Match): Correct wrong code when index in an array is checked after using the index in the array. * makegpr.adb (Add_Switches): Check if there is a package for the processor. If there is no package, do not look for switches. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@92835 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/makegpr.adb')
-rw-r--r--gcc/ada/makegpr.adb77
1 files changed, 39 insertions, 38 deletions
diff --git a/gcc/ada/makegpr.adb b/gcc/ada/makegpr.adb
index 4806a9a7300..28b46704463 100644
--- a/gcc/ada/makegpr.adb
+++ b/gcc/ada/makegpr.adb
@@ -945,55 +945,56 @@ package body Makegpr is
Pkg := Value_Of (Name_Compiler, Data.Decl.Packages);
end case;
- -- Get the Switches ("file name"), if they exist
+ if Pkg /= No_Package then
+ -- Get the Switches ("file name"), if they exist
- Switches_Array := Prj.Util.Value_Of
- (Name => Name_Switches,
- In_Arrays =>
- Packages.Table (Pkg).Decl.Arrays);
-
- Switches :=
- Prj.Util.Value_Of
- (Index => File_Name,
- Src_Index => 0,
- In_Array => Switches_Array);
+ Switches_Array := Prj.Util.Value_Of
+ (Name => Name_Switches,
+ In_Arrays => Packages.Table (Pkg).Decl.Arrays);
- -- Otherwise, get the Default_Switches ("language"), if they exist
+ Switches :=
+ Prj.Util.Value_Of
+ (Index => File_Name,
+ Src_Index => 0,
+ In_Array => Switches_Array);
+
+ -- Otherwise, get the Default_Switches ("language"), if they exist
+
+ if Switches = Nil_Variable_Value then
+ Defaults := Prj.Util.Value_Of
+ (Name => Name_Default_Switches,
+ In_Arrays => Packages.Table (Pkg).Decl.Arrays);
+ Switches := Prj.Util.Value_Of
+ (Index => Language_Names.Table (Language),
+ Src_Index => 0,
+ In_Array => Defaults);
+ end if;
- if Switches = Nil_Variable_Value then
- Defaults := Prj.Util.Value_Of
- (Name => Name_Default_Switches,
- In_Arrays => Packages.Table (Pkg).Decl.Arrays);
- Switches := Prj.Util.Value_Of
- (Index => Language_Names.Table (Language),
- Src_Index => 0,
- In_Array => Defaults);
- end if;
+ -- If there are switches, add them to Arguments
- -- If there are switches, add them to Arguments
+ if Switches /= Nil_Variable_Value then
+ Element_Id := Switches.Values;
+ while Element_Id /= Nil_String loop
+ Element := String_Elements.Table (Element_Id);
- if Switches /= Nil_Variable_Value then
- Element_Id := Switches.Values;
- while Element_Id /= Nil_String loop
- Element := String_Elements.Table (Element_Id);
+ if Element.Value /= No_Name then
+ Get_Name_String (Element.Value);
- if Element.Value /= No_Name then
- Get_Name_String (Element.Value);
+ if not Quiet_Output then
- if not Quiet_Output then
+ -- When not in quiet output (no -q), check that the
+ -- switch is not the concatenation of several valid
+ -- switches, such as "-g -v". If it is, issue a warning.
- -- When not in quiet output (no -q), check that the switch
- -- is not the concatenation of several valid switches,
- -- such as "-g -v". If it is, issue a warning.
+ Check (Option => Name_Buffer (1 .. Name_Len));
+ end if;
- Check (Option => Name_Buffer (1 .. Name_Len));
+ Add_Argument (Name_Buffer (1 .. Name_Len), True);
end if;
- Add_Argument (Name_Buffer (1 .. Name_Len), True);
- end if;
-
- Element_Id := Element.Next;
- end loop;
+ Element_Id := Element.Next;
+ end loop;
+ end if;
end if;
end Add_Switches;