summaryrefslogtreecommitdiff
path: root/gcc/ada/gnatcmd.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2004-07-26 10:42:13 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2004-07-26 10:42:13 +0000
commita39f1c9d98c82f70175088911d5096365efaa480 (patch)
tree70c781e7f9e0b3989847ce98520d13a3cf176d39 /gcc/ada/gnatcmd.adb
parentdb77fe17b1e55336955cea4bbec2f4e312671f96 (diff)
downloadgcc-a39f1c9d98c82f70175088911d5096365efaa480.tar.gz
2004-07-26 Arnaud Charlet <charlet@act-europe.fr>
* sem_util.adb (Requires_Transient_Scope): Temporarily disable optimization, not supported by the tree-ssa back-end. 2004-07-26 Olivier Hainque <hainque@act-europe.fr> * s-mastop-irix.adb: Update comments. * a-except.adb (Exception_Information): Raise Constraint_Error if exception Id is Null_Id. This is required behavior, which is more reliably and clearly checked at the top level interface level. 2004-07-26 Javier Miranda <miranda@gnat.com> * exp_aggr.adb (Build_Array_Aggr_Code): Do not build the initialization call if a component has no default_expression and the box is used. * sem_aggr.adb (Resolve_Array_Aggregate): If a component has no default_expression and you use box, it behaves as if you had declared a stand-alone object. (Resolve_Record_Aggregate): If a component has no default_expression and you use box, it behaves as if you had declared a stand-alone object. * sem_ch10.adb (Install_Siblings): Do not make visible the private entities of private-with siblings. 2004-07-26 Ed Schonberg <schonberg@gnat.com> * sem_ch3.adb (Build_Underlying_Full_View): If this is the full view for a component of an itype, set the parent pointer for analysis, there is no list in which to insert it. * sem_res.adb (Resolve): Call Rewrite_Renamed_Operator only for bona-fide renamings, not for inherited operations. * exp_ch4.adb (Expand_Allocator_Expression): If the allocator is an actual for a formal that is an access parameter, create local finalization list even if the expression is not an aggregate. 2004-07-26 Ed Schonberg <schonberg@gnat.com> PR ada/16213 * sem_ch8.adb (Attribute_Renaming, Check_Library_Level_Renaming): Diagnose properly illegal subprogram renamings that are library units. 2004-07-26 Ed Schonberg <schonberg@gnat.com> PR ada/15588 * sem_util.adb (Is_OK_Variable_For_Out_Formal): If actual is a type conversion rewritten as an unchecked conversion, check that original expression is a variable. * exp_ch4.adb (Expand_N_Type_Conversion): If rewriting as an unchecked_conversion, create new node rather than rewriting in place, to preserve original construct. 2004-07-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * gigi.h (gnat_expand_body): Deleted. * Make-lang.in: (trans.o): Depends on function.h. * misc.c: (gnat_expand_body): Moved to here. * trans.c (gnat_expand_body_1): Deleted. (gnat_expand_body): Moved from here. (gnat_to_gnu): N_Implicit_Label_Declaration forces being in elab proc. (add_stmt): Check for marked visited with global_bindings_p. (gnat_gimplify_expr, case COMPONENT_REF): New case. (gnat_gimplify_expr, case NULL_EXPR): Set TREE_NO_WARNING for temp. * utils2.c (build_binary_op, case MODIFY_EXPR): Put LHS in a VIEW_CONVERT_EXPR if not operation type. * utils.c (update_pointer_to): Set DECL_ORIGINAL_FIELD for fat pointer. * decl.c, cuintp.c, gigi.h, misc.c, trans.c, utils.c, utils2.c: Minor changes: reformatting of negation operators, removing unneeded inequality comparison with zero, converting equality comparisons with zero to negations, changing int/0/1 to bool/false/true, replace calls to gigi_abort with abort, and various other similar changes. 2004-07-26 Vincent Celier <celier@gnat.com> * gnatcmd.adb (GNATCmd): Add processing for new built-in command "setup". * make.adb (Gnatmake): Fail when a library is not present and there is no object directory. * mlib-prj.adb (Check_Library): No need to check if the library needs to be rebuilt if there is no object directory, hence no object files to build the library. * opt.ads (Setup_Projects): New Boolean flag. * prj-nmsc.adb (Locate_Directory): New parameter Project, Kind and Location. Create directory when Kind /= "" and in "gnat setup". Report error if directory cannot be created. (Ada_Check): Create library interface copy dir if it does not exist and we are in "gnat setup". (Find_Sources): No error if in "gnat setup" and no Ada sources were found. (Language_Independent_Check): Create object directory, exec directory and/or library directory if they do not exist and we are in "gnat setup". * vms_conv.ads: (Command_Type): New command Setup. * vms_conv.adb (Initialize): Add Setup component of Cammand_List. * vms_data.ads: Add qualifiers/switches for new built-in command "setup". git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85188 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/gnatcmd.adb')
-rw-r--r--gcc/ada/gnatcmd.adb142
1 files changed, 142 insertions, 0 deletions
diff --git a/gcc/ada/gnatcmd.adb b/gcc/ada/gnatcmd.adb
index fe29ca4e578..91b582a7331 100644
--- a/gcc/ada/gnatcmd.adb
+++ b/gcc/ada/gnatcmd.adb
@@ -1137,6 +1137,148 @@ begin
Exec_Path : String_Access;
begin
+ -- First deal with built-in command(s)
+
+ if The_Command = Setup then
+ Process_Setup :
+ declare
+ Arg_Num : Positive := 1;
+ Argv : String_Access;
+
+ begin
+ while Arg_Num <= Last_Switches.Last loop
+ Argv := Last_Switches.Table (Arg_Num);
+
+ if Argv (Argv'First) /= '-' then
+ Fail ("invalid parameter """, Argv.all, """");
+
+ else
+ if Argv'Length = 1 then
+ Fail
+ ("switch character cannot be followed by a blank");
+ end if;
+
+ -- -vPx Specify verbosity while parsing project files
+
+ if Argv'Length = 4
+ and then Argv (Argv'First + 1 .. Argv'First + 2) = "vP"
+ then
+ case Argv (Argv'Last) is
+ when '0' =>
+ Current_Verbosity := Prj.Default;
+ when '1' =>
+ Current_Verbosity := Prj.Medium;
+ when '2' =>
+ Current_Verbosity := Prj.High;
+ when others =>
+ Fail ("Invalid switch: ", Argv.all);
+ end case;
+
+ -- -Pproject_file Specify project file to be used
+
+ elsif Argv (Argv'First + 1) = 'P' then
+
+ -- Only one -P switch can be used
+
+ if Project_File /= null then
+ Fail
+ (Argv.all,
+ ": second project file forbidden (first is """,
+ Project_File.all & """)");
+
+ elsif Argv'Length = 2 then
+
+ -- There is space between -P and the project file
+ -- name. -P cannot be the last option.
+
+ if Arg_Num = Last_Switches.Last then
+ Fail ("project file name missing after -P");
+
+ else
+ Arg_Num := Arg_Num + 1;
+ Argv := Last_Switches.Table (Arg_Num);
+
+ -- After -P, there must be a project file name,
+ -- not another switch.
+
+ if Argv (Argv'First) = '-' then
+ Fail ("project file name missing after -P");
+
+ else
+ Project_File := new String'(Argv.all);
+ end if;
+ end if;
+
+ else
+ -- No space between -P and project file name
+
+ Project_File :=
+ new String'(Argv (Argv'First + 2 .. Argv'Last));
+ end if;
+
+ -- -Xexternal=value Specify an external reference to be
+ -- used in project files
+
+ elsif Argv'Length >= 5
+ and then Argv (Argv'First + 1) = 'X'
+ then
+ declare
+ Equal_Pos : constant Natural :=
+ Index ('=', Argv (Argv'First + 2 .. Argv'Last));
+ begin
+ if Equal_Pos >= Argv'First + 3 and then
+ Equal_Pos /= Argv'Last then
+ Add
+ (External_Name =>
+ Argv (Argv'First + 2 .. Equal_Pos - 1),
+ Value => Argv (Equal_Pos + 1 .. Argv'Last));
+ else
+ Fail
+ (Argv.all,
+ " is not a valid external assignment.");
+ end if;
+ end;
+
+ elsif Argv.all = "-v" then
+ Verbose_Mode := True;
+
+ elsif Argv.all = "-q" then
+ Quiet_Output := True;
+
+ else
+ Fail ("invalid parameter """, Argv.all, """");
+ end if;
+ end if;
+
+ Arg_Num := Arg_Num + 1;
+ end loop;
+
+ if Project_File = null then
+ Fail ("no project file specified");
+ end if;
+
+ Setup_Projects := True;
+
+ Prj.Pars.Set_Verbosity (To => Current_Verbosity);
+
+ -- Missing directories are created during processing of the
+ -- project tree.
+
+ Prj.Pars.Parse
+ (Project => Project,
+ Project_File_Name => Project_File.all,
+ Packages_To_Check => All_Packages);
+
+ if Project = Prj.No_Project then
+ Fail ("""", Project_File.all, """ processing failed");
+ end if;
+
+ -- Processing is done
+
+ return;
+ end Process_Setup;
+ end if;
+
-- Locate the executable for the command
Exec_Path := Locate_Exec_On_Path (Program);