aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorTom Tromey <tromey@cygnus.com>1999-01-29 15:16:12 +0000
committerTom Tromey <tromey@gcc.gnu.org>1999-01-29 15:16:12 +0000
commit061ac426189161b669a2a0b6e67fab19e7fde25d (patch)
treee9a252b38e6851070778cdef256f821808caf208 /gcc
parent5310566c09b16e37a1db3ea358f03e3efef7ee46 (diff)
downloadgcc-061ac426189161b669a2a0b6e67fab19e7fde25d.zip
gcc-061ac426189161b669a2a0b6e67fab19e7fde25d.tar.gz
gcc-061ac426189161b669a2a0b6e67fab19e7fde25d.tar.bz2
parse.h (BUILD_APPEND): If ARG is a non-String object reference...
* parse.h (BUILD_APPEND): If ARG is a non-String object reference, then cast it to Object before calling `append' method. From-SVN: r24907
Diffstat (limited to 'gcc')
-rw-r--r--gcc/java/ChangeLog5
-rw-r--r--gcc/java/parse.c8
-rw-r--r--gcc/java/parse.h13
3 files changed, 19 insertions, 7 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index c969046..370a37c 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,8 @@
+1999-01-29 Tom Tromey <tromey@cygnus.com>
+
+ * parse.h (BUILD_APPEND): If ARG is a non-String object reference,
+ then cast it to Object before calling `append' method.
+
Thu Jan 28 14:45:39 1999 Per Bothner <bothner@cygnus.com>
* check-init.c (check_bool2_init, check_bool_init, check_init):
diff --git a/gcc/java/parse.c b/gcc/java/parse.c
index 934bf4f..1579499 100644
--- a/gcc/java/parse.c
+++ b/gcc/java/parse.c
@@ -2251,7 +2251,7 @@ static const short yycheck[] = { 3,
#define YYPURE 1
/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
-#line 3 "/usr/local/gnu/share/bison.simple"
+#line 3 "/usr/share/misc/bison.simple"
/* Skeleton output parser for bison,
Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
@@ -2268,7 +2268,7 @@ static const short yycheck[] = { 3,
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* As a special exception, when this file is copied by Bison into a
Bison output file, you may use that output file without restriction.
@@ -2444,7 +2444,7 @@ __yy_memcpy (char *to, char *from, int count)
#endif
#endif
-#line 196 "/usr/local/gnu/share/bison.simple"
+#line 196 "/usr/share/misc/bison.simple"
/* The user can define YYPARSE_PARAM as the name of an argument to be passed
into yyparse. The argument should have type void *.
@@ -4702,7 +4702,7 @@ case 492:
break;}
}
/* the action file gets copied in in place of this dollarsign */
-#line 498 "/usr/local/gnu/share/bison.simple"
+#line 498 "/usr/share/misc/bison.simple"
yyvsp -= yylen;
yyssp -= yylen;
diff --git a/gcc/java/parse.h b/gcc/java/parse.h
index 4cebd5b..13604eed 100644
--- a/gcc/java/parse.h
+++ b/gcc/java/parse.h
@@ -498,9 +498,16 @@ static jdeplist *reverse_jdep_list ();
#define COMPLETE_CHECK_OP_2(NODE) COMPLETE_CHECK_OP(NODE, 2)
/* Building invocations: append(ARG) and StringBuffer(ARG) */
-#define BUILD_APPEND(ARG) \
- build_method_invocation (wfl_append, \
- (ARG ? build_tree_list (NULL, (ARG)): NULL_TREE))
+#define BUILD_APPEND(ARG) \
+ ((JSTRING_TYPE_P (TREE_TYPE (ARG)) || JPRIMITIVE_TYPE_P (TREE_TYPE (ARG))) \
+ ? build_method_invocation (wfl_append, \
+ ARG ? build_tree_list (NULL, (ARG)) : NULL_TREE)\
+ : build_method_invocation (wfl_append, \
+ ARG ? build_tree_list (NULL, \
+ build1 (CONVERT_EXPR, \
+ object_type_node,\
+ (ARG))) \
+ : NULL_TREE))
#define BUILD_STRING_BUFFER(ARG) \
build_new_invocation (wfl_string_buffer, \
(ARG ? build_tree_list (NULL, (ARG)) : NULL_TREE))