aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2010-06-18 15:54:07 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2010-06-18 15:54:07 +0200
commit7b3f937f00f4d14bb1606407b3af663645863446 (patch)
treec6f4afc7cb01f555c6290ff6b90b03372ce383ba /gcc
parent1cf3727fb9a42a5d52ff9c239e4e98053e079e79 (diff)
downloadgcc-7b3f937f00f4d14bb1606407b3af663645863446.zip
gcc-7b3f937f00f4d14bb1606407b3af663645863446.tar.gz
gcc-7b3f937f00f4d14bb1606407b3af663645863446.tar.bz2
[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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog12
-rw-r--r--gcc/ada/gnat1drv.adb4
-rw-r--r--gcc/ada/prj.ads3
-rw-r--r--gcc/ada/sem_elim.adb24
4 files changed, 31 insertions, 12 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 7c6fa2db..e033422 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -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.
diff --git a/gcc/ada/gnat1drv.adb b/gcc/ada/gnat1drv.adb
index 2c95dd6..85d9dcc 100644
--- a/gcc/ada/gnat1drv.adb
+++ b/gcc/ada/gnat1drv.adb
@@ -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;
diff --git a/gcc/ada/prj.ads b/gcc/ada/prj.ads
index d10c65f..4341450 100644
--- a/gcc/ada/prj.ads
+++ b/gcc/ada/prj.ads
@@ -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
diff --git a/gcc/ada/sem_elim.adb b/gcc/ada/sem_elim.adb
index 9917b1f..97faf84 100644
--- a/gcc/ada/sem_elim.adb
+++ b/gcc/ada/sem_elim.adb
@@ -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;