diff options
author | Brendan Kehoe <brendan@cygnus.com> | 1998-06-29 13:39:23 +0000 |
---|---|---|
committer | Brendan Kehoe <brendan@gcc.gnu.org> | 1998-06-29 09:39:23 -0400 |
commit | a48ebb565014a55e24b4ef316a7942591c650ef0 (patch) | |
tree | 2a5be443d807c9fd68297089687a1de4c6e3a7e5 | |
parent | cb6abb6fd58d5742111273a5fe5de2b0b25d7f7c (diff) | |
download | gcc-a48ebb565014a55e24b4ef316a7942591c650ef0.zip gcc-a48ebb565014a55e24b4ef316a7942591c650ef0.tar.gz gcc-a48ebb565014a55e24b4ef316a7942591c650ef0.tar.bz2 |
tree.c (build_srcloc): Make sure we allocate this node on the permanent obstack.
* tree.c (build_srcloc): Make sure we allocate this node on the
permanent obstack.
fixes OSE compilation failures
From-SVN: r20793
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/tree.c | 20 |
2 files changed, 24 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index ff6b55a..edc78a5 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +1998-06-29 Brendan Kehoe <brendan@cygnus.com> + + * tree.c (build_srcloc): Make sure we allocate this node on the + permanent obstack. + Sat Jun 27 23:34:18 1998 Fred Fish <fnf@ninemoons.com> * g++spec.c (NEED_MATH_LIBRARY): Define to 1 if not already defined. diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index 617c4cf..952da29 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -211,6 +211,12 @@ lvalue_p (ref) return (lvalue_p (TREE_OPERAND (ref, 0)) && lvalue_p (TREE_OPERAND (ref, 1))); + case NOP_EXPR: + /* GNU extension: + A cast is a valid lvalue if its operand is an lvalue. */ + if (! pedantic) + return lvalue_p (TREE_OPERAND (ref, 0)); + default: break; } @@ -2300,9 +2306,21 @@ build_srcloc (file, line) char *file; int line; { - tree t = make_node (SRCLOC); + tree t; + + /* Make sure that we put these on the permanent obstack; up in + add_pending_template, we pass this return value into perm_tree_cons, + which also puts it on the permanent_obstack. However, this wasn't + explicitly doing the same. */ + register struct obstack *ambient_obstack = current_obstack; + current_obstack = &permanent_obstack; + + t = make_node (SRCLOC); SRCLOC_FILE (t) = file; SRCLOC_LINE (t) = line; + + current_obstack = ambient_obstack; + return t; } |