summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-12-01 10:24:39 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-12-01 10:24:39 +0000
commita56ef4575a11f6fb0e76f4a2b9f729c81adeded1 (patch)
tree569a4d1362aee6c3b1571fdd7c7f8e5be0d0434d /gcc
parent45b2f957d36f4193e7a92883e9903a05c4a650ba (diff)
downloadgcc-a56ef4575a11f6fb0e76f4a2b9f729c81adeded1.tar.gz
2009-12-01 Thomas Quinot <quinot@adacore.com>
* g-sechas.ads (GNAT.Secure_Hashes.H."=" on Context): Make abstract. 2009-12-01 Matthew Gingell <gingell@adacore.com> * adadecode.c: Allow compilation when building the run time in the gnat runtime. (__gnat_decode): Strip the .nnnn suffix from names of nested functions. * gcc-interface/Makefile.in: Ada adadecode to LIBGNAT_SRCS and LIBGNAT_OBJS. 2009-12-01 Vincent Celier <celier@adacore.com> * gnatcmd.adb (Check_Files): Quote the path names as they may include spaces. 2009-12-01 Ed Schonberg <schonberg@adacore.com> * sem_ch3.adb (Analyze_Object_Declaration): If the defining identifier has already been declared, it may have been rewritten as a renaming declaration. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@154870 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog24
-rw-r--r--gcc/ada/adadecode.c31
-rw-r--r--gcc/ada/g-sechas.ads7
-rw-r--r--gcc/ada/gcc-interface/Makefile.in19
-rw-r--r--gcc/ada/gnatcmd.adb8
-rw-r--r--gcc/ada/sem_ch3.adb7
6 files changed, 80 insertions, 16 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index ddca18f751f..b7c24c42209 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,27 @@
+2009-12-01 Thomas Quinot <quinot@adacore.com>
+
+ * g-sechas.ads (GNAT.Secure_Hashes.H."=" on Context): Make abstract.
+
+2009-12-01 Matthew Gingell <gingell@adacore.com>
+
+ * adadecode.c: Allow compilation when building the run time in the gnat
+ runtime.
+ (__gnat_decode): Strip the .nnnn suffix from names of nested functions.
+
+ * gcc-interface/Makefile.in: Ada adadecode to LIBGNAT_SRCS and
+ LIBGNAT_OBJS.
+
+2009-12-01 Vincent Celier <celier@adacore.com>
+
+ * gnatcmd.adb (Check_Files): Quote the path names as they may include
+ spaces.
+
+2009-12-01 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_ch3.adb (Analyze_Object_Declaration): If the defining identifier
+ has already been declared, it may have been rewritten as a renaming
+ declaration.
+
2009-12-01 Ed Schonberg <schonberg@adacore.com>
* einfo.ads: Clarify use of Is_Private_Primitive.
diff --git a/gcc/ada/adadecode.c b/gcc/ada/adadecode.c
index 86216fcfe7d..43f14f12792 100644
--- a/gcc/ada/adadecode.c
+++ b/gcc/ada/adadecode.c
@@ -29,14 +29,26 @@
* *
****************************************************************************/
-#ifdef IN_GCC
+
+#if defined(IN_RTS)
+#include "tconfig.h"
+#include "tsystem.h"
+#elif defined(IN_GCC)
#include "config.h"
#include "system.h"
-#else
+#endif
+
#include <string.h>
#include <stdio.h>
#include <ctype.h>
+
+#include "adaint.h"
+
+#ifndef ISDIGIT
#define ISDIGIT(c) isdigit(c)
+#endif
+
+#ifndef PARMS
#define PARMS(ARGS) ARGS
#endif
@@ -237,6 +249,21 @@ __gnat_decode (const char *coded_name, char *ada_name, int verbose)
}
}
+ /* Check for nested subprogram ending in .nnnn and strip suffix. */
+ {
+ int last = strlen (ada_name) - 1;
+
+ while (ISDIGIT (ada_name[last]) && last > 0)
+ {
+ last--;
+ }
+
+ if (ada_name[last] == '.')
+ {
+ ada_name[last] = (char) 0;
+ }
+ }
+
/* Change all "__" to ".". */
{
int len = strlen (ada_name);
diff --git a/gcc/ada/g-sechas.ads b/gcc/ada/g-sechas.ads
index 55180ac4ca4..e0630015884 100644
--- a/gcc/ada/g-sechas.ads
+++ b/gcc/ada/g-sechas.ads
@@ -133,6 +133,13 @@ package GNAT.Secure_Hashes is
type Context is private;
-- The internal processing state of the hashing function
+ function "=" (L, R : Context) return Boolean is abstract;
+ -- Context is the internal, implementation defined state of an
+ -- intermediate state in a hash computation, and no specific semantics
+ -- can be expected on equality of context values. Only equality of
+ -- final hash values (as returned by the [Wide_]Digest functions below)
+ -- is meaningful.
+
Initial_Context : constant Context;
-- Initial value of a Context object. May be used to reinitialize
-- a Context value by simple assignment of this value to the object.
diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in
index 85fc0106044..975db0f2b7d 100644
--- a/gcc/ada/gcc-interface/Makefile.in
+++ b/gcc/ada/gcc-interface/Makefile.in
@@ -2113,15 +2113,16 @@ endif
# while GNATRTL_OBJS lists the object files compiled from Ada sources that
# go into the directory. The pthreads emulation is built in the threads
# subdirectory and copied.
-LIBGNAT_SRCS = adaint.c adaint.h argv.c cio.c cstreams.c \
- errno.c exit.c cal.c ctrl_c.c env.c env.h arit64.c \
- raise.h raise.c sysdep.c aux-io.c init.c initialize.c seh_init.c \
- final.c tracebak.c tb-alvms.c tb-alvxw.c tb-gcc.c expect.c mkdir.c \
- socket.c gsocket.h targext.c $(EXTRA_LIBGNAT_SRCS)
-
-LIBGNAT_OBJS = adaint.o argv.o cio.o cstreams.o ctrl_c.o errno.o exit.o env.o \
- raise.o sysdep.o aux-io.o init.o initialize.o seh_init.o cal.o arit64.o \
- final.o tracebak.o expect.o mkdir.o socket.o targext.o $(EXTRA_LIBGNAT_OBJS)
+LIBGNAT_SRCS = adadecode.c adadecode.h adaint.c adaint.h \
+ argv.c cio.c cstreams.c errno.c exit.c cal.c ctrl_c.c env.c env.h \
+ arit64.c raise.h raise.c sysdep.c aux-io.c init.c initialize.c \
+ seh_init.c final.c tracebak.c tb-alvms.c tb-alvxw.c tb-gcc.c \
+ expect.c mkdir.c socket.c gsocket.h targext.c $(EXTRA_LIBGNAT_SRCS)
+
+LIBGNAT_OBJS = adadecode.o adaint.o argv.o cio.o cstreams.o ctrl_c.o \
+ errno.o exit.o env.o raise.o sysdep.o aux-io.o init.o initialize.o \
+ seh_init.o cal.o arit64.o final.o tracebak.o expect.o mkdir.o \
+ socket.o targext.o $(EXTRA_LIBGNAT_OBJS)
# NOTE ??? - when the -I option for compiling Ada code is made to work,
# the library installation will change and there will be a
diff --git a/gcc/ada/gnatcmd.adb b/gcc/ada/gnatcmd.adb
index 1588d4e43a8..bfde10d6ae1 100644
--- a/gcc/ada/gnatcmd.adb
+++ b/gcc/ada/gnatcmd.adb
@@ -575,8 +575,12 @@ procedure GNATCmd is
(Unit.File_Names (Kind).Project, Project)
and then not Unit.File_Names (Kind).Locally_Removed
then
- Get_Name_String
- (Unit.File_Names (Kind).Path.Display_Name);
+ Name_Len := 0;
+ Add_Char_To_Name_Buffer ('"');
+ Add_Str_To_Name_Buffer
+ (Get_Name_String
+ (Unit.File_Names (Kind).Path.Display_Name));
+ Add_Char_To_Name_Buffer ('"');
if FD /= Invalid_FD then
Name_Len := Name_Len + 1;
diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb
index 1717aec7afc..1845e80916c 100644
--- a/gcc/ada/sem_ch3.adb
+++ b/gcc/ada/sem_ch3.adb
@@ -9725,11 +9725,12 @@ package body Sem_Ch3 is
New_T := Any_Type;
end if;
- -- If previous full declaration exists, or if a homograph is present,
- -- let Enter_Name handle it, either with an error, or with the removal
- -- of an overridden implicit subprogram.
+ -- If previous full declaration or a renaming declaration exists, or if
+ -- a homograph is present, let Enter_Name handle it, either with an
+ -- error or with the removal of an overridden implicit subprogram.
if Ekind (Prev) /= E_Constant
+ or else Nkind (Parent (Prev)) = N_Object_Renaming_Declaration
or else Present (Expression (Parent (Prev)))
or else Present (Full_View (Prev))
then