aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2012-01-23 09:33:32 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2012-01-23 09:33:32 +0100
commit022d9ce887c7ca3637c597ed81d90d66e23071a1 (patch)
tree24c6d2f65f334790e0dc2c1ed80a70cc97b0af9c /gcc
parente1308fa85fd1a90f8d8da884531b6081d2a4d8a7 (diff)
downloadgcc-022d9ce887c7ca3637c597ed81d90d66e23071a1.zip
gcc-022d9ce887c7ca3637c597ed81d90d66e23071a1.tar.gz
gcc-022d9ce887c7ca3637c597ed81d90d66e23071a1.tar.bz2
[multiple changes]
2012-01-23 Gary Dismukes <dismukes@adacore.com> * exp_util.adb (Is_Iterated_Container): Test Is_Entity_Name when searching for calls to the default iterator, to avoid blowing up on indirect calls which have an explicit dereference as the call name. 2012-01-23 Thomas Quinot <quinot@adacore.com> * errout.adb (Set_Msg_Node): For an N_Expanded_Name, output the complete expanded name, rather than just its Selector_Name. 2012-01-23 Thomas Quinot <quinot@adacore.com> * a-textio.adb (Put): Rewrite one-parameter Character version to just call the two-parameter one with Current_Out. From-SVN: r183408
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog17
-rw-r--r--gcc/ada/a-textio.adb27
-rw-r--r--gcc/ada/errout.adb42
-rw-r--r--gcc/ada/exp_util.adb8
4 files changed, 48 insertions, 46 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 2e90cfb..0682c64 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,20 @@
+2012-01-23 Gary Dismukes <dismukes@adacore.com>
+
+ * exp_util.adb (Is_Iterated_Container): Test
+ Is_Entity_Name when searching for calls to the default iterator,
+ to avoid blowing up on indirect calls which have an explicit
+ dereference as the call name.
+
+2012-01-23 Thomas Quinot <quinot@adacore.com>
+
+ * errout.adb (Set_Msg_Node): For an N_Expanded_Name, output
+ the complete expanded name, rather than just its Selector_Name.
+
+2012-01-23 Thomas Quinot <quinot@adacore.com>
+
+ * a-textio.adb (Put): Rewrite one-parameter Character version to
+ just call the two-parameter one with Current_Out.
+
2012-01-23 Hristian Kirtchev <kirtchev@adacore.com>
* freeze.adb (Check_Current_Instance): Issue an
diff --git a/gcc/ada/a-textio.adb b/gcc/ada/a-textio.adb
index 721deca..28e5541 100644
--- a/gcc/ada/a-textio.adb
+++ b/gcc/ada/a-textio.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2010, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2012, 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- --
@@ -1274,30 +1274,7 @@ package body Ada.Text_IO is
procedure Put (Item : Character) is
begin
- FIO.Check_Write_Status (AP (Current_Out));
-
- if Current_Out.Line_Length /= 0
- and then Current_Out.Col > Current_Out.Line_Length
- then
- New_Line (Current_Out);
- end if;
-
- -- If lower half character, or brackets encoding, output directly
-
- if Character'Pos (Item) < 16#80#
- or else Default_WCEM = WCEM_Brackets
- then
- if fputc (Character'Pos (Item), Current_Out.Stream) = EOF then
- raise Device_Error;
- end if;
-
- -- Case of upper half character with non-brackets encoding
-
- else
- Put_Encoded (Current_Out, Item);
- end if;
-
- Current_Out.Col := Current_Out.Col + 1;
+ Put (Current_Out, Item);
end Put;
---------
diff --git a/gcc/ada/errout.adb b/gcc/ada/errout.adb
index c40179a..5e3bb4a 100644
--- a/gcc/ada/errout.adb
+++ b/gcc/ada/errout.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2011, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2012, 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- --
@@ -144,7 +144,9 @@ package body Errout is
procedure Set_Msg_Node (Node : Node_Id);
-- Add the sequence of characters for the name associated with the
- -- given node to the current message.
+ -- given node to the current message. For N_Designator, N_Defining_Program_
+ -- Unit_Name, N_Selected_Component, and N_Expanded_Name, the Prefix is
+ -- included as well.
procedure Set_Msg_Text (Text : String; Flag : Source_Ptr);
-- Add a sequence of characters to the current message. The characters may
@@ -2499,24 +2501,28 @@ package body Errout is
Nam : Name_Id;
begin
- if Nkind (Node) = N_Designator then
- Set_Msg_Node (Name (Node));
- Set_Msg_Char ('.');
- Set_Msg_Node (Identifier (Node));
- return;
+ case Nkind (Node) is
+ when N_Designator =>
+ Set_Msg_Node (Name (Node));
+ Set_Msg_Char ('.');
+ Set_Msg_Node (Identifier (Node));
+ return;
- elsif Nkind (Node) = N_Defining_Program_Unit_Name then
- Set_Msg_Node (Name (Node));
- Set_Msg_Char ('.');
- Set_Msg_Node (Defining_Identifier (Node));
- return;
+ when N_Defining_Program_Unit_Name =>
+ Set_Msg_Node (Name (Node));
+ Set_Msg_Char ('.');
+ Set_Msg_Node (Defining_Identifier (Node));
+ return;
- elsif Nkind (Node) = N_Selected_Component then
- Set_Msg_Node (Prefix (Node));
- Set_Msg_Char ('.');
- Set_Msg_Node (Selector_Name (Node));
- return;
- end if;
+ when N_Selected_Component | N_Expanded_Name =>
+ Set_Msg_Node (Prefix (Node));
+ Set_Msg_Char ('.');
+ Set_Msg_Node (Selector_Name (Node));
+ return;
+
+ when others =>
+ null;
+ end case;
-- The only remaining possibilities are identifiers, defining
-- identifiers, pragmas, and pragma argument associations.
diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb
index dd5fc98..41bfa38 100644
--- a/gcc/ada/exp_util.adb
+++ b/gcc/ada/exp_util.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2011, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2012, 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- --
@@ -4249,9 +4249,11 @@ package body Exp_Util is
-- The call must invoke the default iterate routine of
-- the container and the transient object must appear as
- -- the first actual parameter.
+ -- the first actual parameter. Skip any calls whose names
+ -- are not entities.
- if Entity (Name (Call)) = Iter
+ if Is_Entity_Name (Name (Call))
+ and then Entity (Name (Call)) = Iter
and then Present (Parameter_Associations (Call))
then
Param := First (Parameter_Associations (Call));