This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: gcj: Is this a bug?



Graham Stott writes:

> Just curious, are you sure you mean to cast file which tree node to
> a (const char *) it just looks wrong to me.

Duh. You're right.

> At a guess shouldn't this be current_jcf->filename instead of (const
> char *)file?

It doesn't matter, we can pass NULL and always use EXPR_WFL_FILENAME_NODE.
I'll ammend the patch I was about to commit.

Thanks!

./A
	...
        * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to
        `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE.
	...

Index: jcf-parse.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/java/jcf-parse.c,v
retrieving revision 1.67
diff -u -p -r1.67 jcf-parse.c
--- jcf-parse.c 2000/12/16 01:51:51     1.67
+++ jcf-parse.c 2001/01/10 16:31:12
@@ -569,9 +569,8 @@ jcf_parse_source ()
   java_push_parser_context ();
   BUILD_FILENAME_IDENTIFIER_NODE (file, current_jcf->filename);
   if (wfl_operator == NULL_TREE)
-    wfl_operator = build_expr_wfl (NULL_TREE, file, 0, 0);
-  else
-    EXPR_WFL_FILENAME_NODE (wfl_operator) = file;
+    wfl_operator = build_expr_wfl (NULL_TREE, NULL, 0, 0);
+  EXPR_WFL_FILENAME_NODE (wfl_operator) = file;
   input_filename = ggc_strdup (current_jcf->filename);
   current_class = NULL_TREE;
   current_function_decl = NULL_TREE;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]