summaryrefslogtreecommitdiffstats
path: root/contrib/gcc/cp
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/gcc/cp')
-rw-r--r--contrib/gcc/cp/ChangeLog14
-rw-r--r--contrib/gcc/cp/errfn.c4
-rw-r--r--contrib/gcc/cp/lex.c7
3 files changed, 22 insertions, 3 deletions
diff --git a/contrib/gcc/cp/ChangeLog b/contrib/gcc/cp/ChangeLog
index d2ef74f..420e25d 100644
--- a/contrib/gcc/cp/ChangeLog
+++ b/contrib/gcc/cp/ChangeLog
@@ -1,3 +1,17 @@
+Thu Aug 22 23:47:38 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
+
+ * Version 2.7.2.3 released.
+
+Mon Apr 29 00:27:53 1996 Jason Merrill <jason@yorick.cygnus.com>
+
+ * lex.c (real_yylex): Fix handling of __PRETTY_FUNCTION__ like C
+ frontend.
+
+Thu Oct 26 16:45:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
+
+ * errfn.c: Include stdio.h.
+ (cp_sprintf): Take out decl of sprintf, and cast sprintf to errorfn*.
+
Mon Nov 20 14:06:28 1995 Mike Stump <mrs@cygnus.com>
* Version 2.7.2 released.
diff --git a/contrib/gcc/cp/errfn.c b/contrib/gcc/cp/errfn.c
index f36b0e1..4da07fa 100644
--- a/contrib/gcc/cp/errfn.c
+++ b/contrib/gcc/cp/errfn.c
@@ -21,6 +21,7 @@ Boston, MA 02111-1307, USA. */
#include "config.h"
#include "tree.h"
+#include <stdio.h>
#include <ctype.h>
/* cp_printer is the type of a function which converts an argument into
@@ -195,8 +196,7 @@ cp_sprintf (format, arglist)
char *format;
arglist_dcl
{
- extern errorfn sprintf;
- cp_thing (sprintf, 0, format, arglist);
+ cp_thing ((errorfn *) sprintf, 0, format, arglist);
}
void
diff --git a/contrib/gcc/cp/lex.c b/contrib/gcc/cp/lex.c
index 22763f5..9e51883 100644
--- a/contrib/gcc/cp/lex.c
+++ b/contrib/gcc/cp/lex.c
@@ -3381,7 +3381,12 @@ real_yylex ()
&& DECL_INITIAL (tmp) != NULL_TREE
&& TREE_CODE (DECL_INITIAL (tmp)) == STRING_CST)
{
- yylval.ttype = DECL_INITIAL (tmp);
+ tree stringval = DECL_INITIAL (tmp);
+
+ /* Copy the string value so that we won't clobber anything
+ if we put something in the TREE_CHAIN of this one. */
+ yylval.ttype = build_string (TREE_STRING_LENGTH (stringval),
+ TREE_STRING_POINTER (stringval));
value = STRING;
}
}
OpenPOWER on IntegriCloud