summaryrefslogtreecommitdiff
path: root/gcc/ada/env.c
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-04 09:18:12 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-04 09:18:12 +0000
commitf1f3250a6c57dbc6e595773adf43a5181dfae467 (patch)
treea2002af452b1527d28b25193a57cac52564eb312 /gcc/ada/env.c
parent77f9be2dab5055773bb3411b708c79f2a76c3590 (diff)
downloadgcc-f1f3250a6c57dbc6e595773adf43a5181dfae467.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177342 138bc75d-0d04-0410-961f-82ee72b054a4
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 dc18e4e6a21..c58139a2d68 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