aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/env.c
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2011-08-04 11:18:12 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2011-08-04 11:18:12 +0200
commit78efd7125942f0707f1853749c8a77f498061635 (patch)
treea2002af452b1527d28b25193a57cac52564eb312 /gcc/ada/env.c
parent0170a691940f8064a86e3af4cccb5960b2ffe07a (diff)
downloadgcc-78efd7125942f0707f1853749c8a77f498061635.zip
gcc-78efd7125942f0707f1853749c8a77f498061635.tar.gz
gcc-78efd7125942f0707f1853749c8a77f498061635.tar.bz2
[multiple changes]
2011-08-04 Yannick Moy <moy@adacore.com> * par-ch13.adb (Aspect_Specifications_Present): recognize "with Identifier'Class =>" as an aspect, so that a meaningful warning is issued in Strict mode. * par.adb: Fix typos in comments. 2011-08-04 Yannick Moy <moy@adacore.com> * sem_attr.adb (Result): modify error message to take into account Post aspect when compiling Ada 2012 (or newer) code. 2011-08-04 Nicolas Roche <roche@adacore.com> * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to remove need for GCC exceptions. 2011-08-04 Vincent Celier <celier@adacore.com> * makeutl.adb (Do_Complete): Call Debug_Output with the name of the project, not the source file name. * prj.adb (Find_Sources.Look_For_Sources): If the source has been excluded, continue looking. This excluded source will only be returned if there is no other source with the same base name that is not locally removed. 2011-08-04 Ed Schonberg <schonberg@adacore.com> * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is private and one of the operands is a real literal, use a qualified expression rather than a conversion which is not meaningful to the back-end. From-SVN: r177342
Diffstat (limited to 'gcc/ada/env.c')
-rw-r--r--gcc/ada/env.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/ada/env.c b/gcc/ada/env.c
index dc18e4e..c58139a 100644
--- a/gcc/ada/env.c
+++ b/gcc/ada/env.c
@@ -316,10 +316,12 @@ void __gnat_clearenv (void) {
/* create a string that contains "name" */
size++;
{
- char expression[size];
+ char *expression;
+ expression = (char *) xmalloc (size * sizeof (char));
strncpy (expression, env[0], size);
expression[size - 1] = 0;
__gnat_unsetenv (expression);
+ free (expression);
}
}
#else