[multiple changes]
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. From-SVN: r160992
This commit is contained in:
parent
1cf3727fb9
commit
7b3f937f00
@ -1,3 +1,15 @@
|
||||
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.
|
||||
|
@ -353,8 +353,8 @@ procedure Gnat1drv is
|
||||
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;
|
||||
|
@ -6,7 +6,7 @@
|
||||
-- --
|
||||
-- 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- --
|
||||
@ -894,6 +894,7 @@ package Prj is
|
||||
type Response_File_Format is
|
||||
(None,
|
||||
GNU,
|
||||
GCC,
|
||||
Object_List,
|
||||
Option_List);
|
||||
-- The format of the different response files
|
||||
|
@ -344,10 +344,9 @@ package body Sem_Elim is
|
||||
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);
|
||||
|
||||
@ -723,14 +722,19 @@ package body Sem_Elim is
|
||||
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;
|
||||
@ -762,7 +766,9 @@ package body Sem_Elim is
|
||||
-- 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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user