+2010-06-18 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_elim.adb: Proper error message on improperly eliminated instances
+
+2010-06-18 Vincent Celier <celier@adacore.com>
+
+ * prj.ads (Response_File_Format): New value GCC.
+
+2010-06-18 Thomas Quinot <quinot@adacore.com>
+
+ * gnat1drv.adb: Minor reformatting.
+
2010-06-18 Robert Dewar <dewar@adacore.com>
* make.adb, sem_cat.adb: Minor reformatting.
then
Use_Expression_With_Actions := False;
- -- Otherwise normal gcc back end, which does implement this feature
- -- so by default we allow its use.
+ -- Otherwise normal gcc back end, which does implement this feature so
+ -- by default we allow its use.
else
Use_Expression_With_Actions := True;
-- --
-- S p e c --
-- --
--- Copyright (C) 2001-2009, Free Software Foundation, Inc. --
+-- Copyright (C) 2001-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- --
type Response_File_Format is
(None,
GNU,
+ GCC,
Object_List,
Option_List);
-- The format of the different response files
if Present (Elmt.Entity_Node)
and then Elmt.Entity_Scope /= null
then
-
- -- Check that names of enclosing scopes match.
- -- Skip blocks and wrapper package of subprogram instances,
- -- which do not appear in the pragma.
+ -- Check that names of enclosing scopes match. Skip blocks and
+ -- wrapper package of subprogram instances, which do not appear
+ -- in the pragma.
Scop := Scope (E);
Enclosing_Subp := Enclosing_Subprogram (Enclosing_Subp);
end loop;
- -- Emit error, unless we are within an instance body and
- -- the expander is disabled, which indicates an instance
- -- within an enclosing generic.
+ -- Emit error, unless we are within an instance body and the expander
+ -- is disabled, indicating an instance within an enclosing generic.
+ -- In an instance, the ultimate alias is an internal entity, so place
+ -- the message on the original subprogram.
if In_Instance_Body and then not Expander_Active then
null;
- else
+
+ elsif Comes_From_Source (Ultimate_Subp) then
Eliminate_Error_Msg (N, Ultimate_Subp);
+
+ else
+ Eliminate_Error_Msg (N, S);
end if;
end if;
end Check_For_Eliminated_Subprogram;
-- Otherwise should not fall through, entry should be in table
else
- raise Program_Error;
+ Error_Msg_NE
+ ("subprogram& is called but its alias is eliminated", N, E);
+ -- raise Program_Error;
end if;
end Eliminate_Error_Msg;