summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-06-11 15:48:14 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-06-11 15:48:14 +0000
commit7465a8fedbf566587913918be29fc5fc1179cd75 (patch)
tree19753f5474920d21f293504fc129ecc940941eac /gcc
parentdf3bfef4976e316e98255ea179d308cf56d051c8 (diff)
downloadgcc-7465a8fedbf566587913918be29fc5fc1179cd75.tar.gz
2009-06-11 Ed Schonberg <schonberg@adacore.com>
* sem_attr.adb (Resolve_Attribute, case 'access): Add missing accessibiliy check on access_to_subprogram in the context of an anonymous access that is not an access parameter. 2009-06-11 Eric Botcazou <ebotcazou@adacore.com> * tracebak.c (i386 section): Define IS_BAD_PTR on Solaris. 2009-06-11 Quentin Ochem <ochem@adacore.com> * sem_warn.adb, scng.adb, sfn_scan.adb, freeze.adb: Add CODEFIX comments for message handled by GPS. 2009-06-11 Matthew Gingell <gingell@adacore.com> * adaint.c: Use fopen64 instead of fopen on platforms where we know it's supported. 2009-06-11 Pascal Obry <obry@adacore.com> * g-cgi.ads: Fix comment typo. * g-cgi.adb: Properly decode "+" in CGI parameters as spaces. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@148392 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog26
-rw-r--r--gcc/ada/adaint.c8
-rw-r--r--gcc/ada/freeze.adb4
-rw-r--r--gcc/ada/g-cgi.adb7
-rw-r--r--gcc/ada/g-cgi.ads4
-rw-r--r--gcc/ada/scng.adb3
-rw-r--r--gcc/ada/sem_attr.adb10
-rw-r--r--gcc/ada/sem_warn.adb6
-rw-r--r--gcc/ada/sfn_scan.adb3
-rw-r--r--gcc/ada/tracebak.c6
10 files changed, 60 insertions, 17 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index deb5f07a7ad..8f29f5b3f24 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,29 @@
+2009-06-11 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_attr.adb (Resolve_Attribute, case 'access): Add missing
+ accessibiliy check on access_to_subprogram in the context of an
+ anonymous access that is not an access parameter.
+
+2009-06-11 Eric Botcazou <ebotcazou@adacore.com>
+
+ * tracebak.c (i386 section): Define IS_BAD_PTR on Solaris.
+
+2009-06-11 Quentin Ochem <ochem@adacore.com>
+
+ * sem_warn.adb, scng.adb, sfn_scan.adb, freeze.adb: Add CODEFIX
+ comments for message handled by GPS.
+
+2009-06-11 Matthew Gingell <gingell@adacore.com>
+
+ * adaint.c: Use fopen64 instead of fopen on platforms where we know
+ it's supported.
+
+2009-06-11 Pascal Obry <obry@adacore.com>
+
+ * g-cgi.ads: Fix comment typo.
+
+ * g-cgi.adb: Properly decode "+" in CGI parameters as spaces.
+
2009-06-10 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Use
diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c
index 1f5e1546796..dd36bac4cb6 100644
--- a/gcc/ada/adaint.c
+++ b/gcc/ada/adaint.c
@@ -775,8 +775,16 @@ __gnat_fopen (char *path, char *mode, int encoding ATTRIBUTE_UNUSED)
#elif defined (VMS)
return decc$fopen (path, mode);
#else
+
+#if defined (__GLIBC__) || defined (sun)
+ /* GLIBC and Solaris provides fopen64, which allows IO on files
+ larger than 2GB on systems that support it. */
+ return fopen64 (path, mode);
+#else
return fopen (path, mode);
#endif
+
+#endif
}
FILE *
diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb
index 1f91db98388..079b39cd0ec 100644
--- a/gcc/ada/freeze.adb
+++ b/gcc/ada/freeze.adb
@@ -2205,9 +2205,9 @@ package body Freeze is
declare
Sz : constant Node_Id := Size_Clause (Rec);
begin
- Error_Msg_NE
+ Error_Msg_NE -- CODEFIX
("size given for& too small", Sz, Rec);
- Error_Msg_N
+ Error_Msg_N -- CODEFIX
("\use explicit pragma Pack "
& "or use pragma Implicit_Packing", Sz);
end;
diff --git a/gcc/ada/g-cgi.adb b/gcc/ada/g-cgi.adb
index 34f3e4f3266..b1b6789e4fb 100644
--- a/gcc/ada/g-cgi.adb
+++ b/gcc/ada/g-cgi.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 2001-2006, AdaCore --
+-- Copyright (C) 2001-2009, AdaCore --
-- --
-- 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- --
@@ -123,6 +123,11 @@ package body GNAT.CGI is
(Natural'Value ("16#" & S (K + 1 .. K + 2) & '#'));
K := K + 3;
+ elsif S (K) = '+' then
+ -- + sign is decoded as a space
+ Result (J) := ' ';
+ K := K + 1;
+
else
Result (J) := S (K);
K := K + 1;
diff --git a/gcc/ada/g-cgi.ads b/gcc/ada/g-cgi.ads
index eb7d70cbb29..b444b586edd 100644
--- a/gcc/ada/g-cgi.ads
+++ b/gcc/ada/g-cgi.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 2000-2006, AdaCore --
+-- Copyright (C) 2000-2009, AdaCore --
-- --
-- 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- --
@@ -78,7 +78,7 @@
-- -- the HTML form) and that one of them is called "client_name".
-- if CGI.Argument_Count = 2
--- and the CGI.Key_Exists ("client_name")
+-- and then CGI.Key_Exists ("client_name")
-- then
-- Add_Client_To_Database (CGI.Value ("client_name"));
-- end if;
diff --git a/gcc/ada/scng.adb b/gcc/ada/scng.adb
index 56b1e4cc404..e7d9edc336e 100644
--- a/gcc/ada/scng.adb
+++ b/gcc/ada/scng.adb
@@ -875,7 +875,8 @@ package body Scng is
end if;
end if;
- Error_Msg_S ("missing string quote");
+ Error_Msg_S -- CODEFIX
+ ("missing string quote");
end Error_Unterminated_String;
----------------
diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb
index 028d8b54ac3..51536ae5bd1 100644
--- a/gcc/ada/sem_attr.adb
+++ b/gcc/ada/sem_attr.adb
@@ -7834,16 +7834,16 @@ package body Sem_Attr is
-- Check the static accessibility rule of 3.10.2(32).
-- This rule also applies within the private part of an
-- instantiation. This rule does not apply to anonymous
- -- access-to-subprogram types (Ada 2005).
+ -- access-to-subprogram types in access parameters.
elsif Attr_Id = Attribute_Access
and then not In_Instance_Body
+ and then
+ (Ekind (Btyp) = E_Access_Subprogram_Type
+ or else Is_Local_Anonymous_Access (Btyp))
+
and then Subprogram_Access_Level (Entity (P)) >
Type_Access_Level (Btyp)
- and then Ekind (Btyp) /=
- E_Anonymous_Access_Subprogram_Type
- and then Ekind (Btyp) /=
- E_Anonymous_Access_Protected_Subprogram_Type
then
Error_Msg_F
("subprogram must not be deeper than access type", P);
diff --git a/gcc/ada/sem_warn.adb b/gcc/ada/sem_warn.adb
index 8132531cc0c..0ba87cccc4c 100644
--- a/gcc/ada/sem_warn.adb
+++ b/gcc/ada/sem_warn.adb
@@ -3523,11 +3523,11 @@ package body Sem_Warn is
if Nkind (Original_Node (X)) = N_Integer_Literal then
if Intval (X) = Low_Bound then
- Error_Msg_FE
+ Error_Msg_FE -- CODEFIX
("\suggested replacement: `&''First`", X, Ent);
else
Error_Msg_Uint_1 := Intval (X) - Low_Bound;
- Error_Msg_FE
+ Error_Msg_FE -- CODEFIX
("\suggested replacement: `&''First + ^`", X, Ent);
end if;
@@ -3633,7 +3633,7 @@ package body Sem_Warn is
-- Replacement subscript is now in string buffer
- Error_Msg_FE
+ Error_Msg_FE -- CODEFIX
("\suggested replacement: `&~`", Original_Node (X), Ent);
end if;
diff --git a/gcc/ada/sfn_scan.adb b/gcc/ada/sfn_scan.adb
index 226ef8b58d1..dc6ab38d448 100644
--- a/gcc/ada/sfn_scan.adb
+++ b/gcc/ada/sfn_scan.adb
@@ -637,7 +637,8 @@ package body SFN_Scan is
loop
if At_EOF or else S (P) = LF or else S (P) = CR then
- Error ("missing string quote");
+ Error -- CODEFIX
+ ("missing string quote");
elsif S (P) = HT then
Error ("tab character in string");
diff --git a/gcc/ada/tracebak.c b/gcc/ada/tracebak.c
index 8f3c4cc389d..63f93b37eb7 100644
--- a/gcc/ada/tracebak.c
+++ b/gcc/ada/tracebak.c
@@ -6,7 +6,7 @@
* *
* C Implementation File *
* *
- * Copyright (C) 2000-2008, AdaCore *
+ * Copyright (C) 2000-2009, AdaCore *
* *
* 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- *
@@ -294,9 +294,11 @@ struct layout
#elif defined (i386)
-#ifdef __WIN32
+#if defined (__WIN32)
#include <windows.h>
#define IS_BAD_PTR(ptr) (IsBadCodePtr((void *)ptr))
+#elif defined (sun)
+#define IS_BAD_PTR(ptr) ((unsigned long)ptr == -1)
#else
#define IS_BAD_PTR(ptr) 0
#endif