parse.h (BUILD_APPEND): If ARG is a non-String object reference...
authorTom Tromey <tromey@cygnus.com>
Fri, 29 Jan 1999 15:16:12 +0000 (15:16 +0000)
committerTom Tromey <tromey@gcc.gnu.org>
Fri, 29 Jan 1999 15:16:12 +0000 (15:16 +0000)
* parse.h (BUILD_APPEND): If ARG is a non-String object reference,
then cast it to Object before calling `append' method.

From-SVN: r24907

gcc/java/ChangeLog
gcc/java/parse.c
gcc/java/parse.h

index c969046a07e78f086806f7c3adc3fde5120888de..370a37c364589ce15bacb8ea6e044edcdc0d7cf8 100644 (file)
@@ -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):
index 934bf4f9a7b8e109f2eb92a27c5ce6bdfc001569..1579499d7f4088cb3e6fe9d02156e78125c423db 100644 (file)
@@ -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
 \f
-#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"
 \f
   yyvsp -= yylen;
   yyssp -= yylen;
index 4cebd5b865922741ca7b3b181a20e1df57b167da..13604eed34a6d6392288ba37a624ac0d82a4611a 100644 (file)
@@ -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))