diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-12-01 11:24:39 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-12-01 11:24:39 +0100 |
commit | 4f08579c5e251083876d7a64fa843ec4b6a36d2a (patch) | |
tree | 569a4d1362aee6c3b1571fdd7c7f8e5be0d0434d /gcc/ada/adadecode.c | |
parent | c7ba0cfb619b379a84535227d60d86f64fe086d7 (diff) | |
download | gcc-4f08579c5e251083876d7a64fa843ec4b6a36d2a.zip gcc-4f08579c5e251083876d7a64fa843ec4b6a36d2a.tar.gz gcc-4f08579c5e251083876d7a64fa843ec4b6a36d2a.tar.bz2 |
[multiple changes]
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.
From-SVN: r154870
Diffstat (limited to 'gcc/ada/adadecode.c')
-rw-r--r-- | gcc/ada/adadecode.c | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/gcc/ada/adadecode.c b/gcc/ada/adadecode.c index 86216fc..43f14f1 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); |