This is the mail archive of the java-prs@sourceware.cygnus.com mailing list for the Java project.


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

gcj/53: jc1 doesn't seem to be able to compile from stdin anymore.



>Number:         53
>Category:       gcj
>Synopsis:       jc1 doesn't seem to be able to compile from stdin anymore.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    apbianco
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Sep 24 12:30:02 PDT 1999
>Closed-Date:
>Last-Modified:
>Originator:     Alex Petit-Bianco
>Release:        Current egcs
>Organization:
>Environment:
Linux and other Unices.
>Description:
Even with this patch:

Index: jcf-parse.c
===================================================================
RCS file: /cvs/egcs/egcs/gcc/java/jcf-parse.c,v
retrieving revision 1.34
diff -u -p -r1.34 jcf-parse.c
--- jcf-parse.c 1999/09/16 15:45:10     1.34
+++ jcf-parse.c 1999/09/24 19:12:27
@@ -865,7 +868,10 @@ yyparse ()
       
       /* Set jcf up and open a new file */
       JCF_ZERO (main_jcf);
-      main_jcf->read_state = fopen (IDENTIFIER_POINTER (name), "rb");
+      if (!strcmp (IDENTIFIER_POINTER (name), "stdin"))
+       main_jcf->read_state = stdin;
+      else
+       main_jcf->read_state = fopen (IDENTIFIER_POINTER (name), "rb");
       if (main_jcf->read_state == NULL)
        pfatal_with_name (IDENTIFIER_POINTER (name));
       
jc1 doesn't seem to be able to process things from stdin.
The lexer seems to see errors when processing perfectly valid
Java code.
>How-To-Repeat:
After the patch above is applied, with:

  echo "class bar {}" | ...../jc1

We get:

  stdin:1: Can't open file - java_display_line_col

Because jc1 finds an error and wants to report it. The
way we report errors should be fixed when the input is stdin,
but jc1 shouldn't report an error in the first place.
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:

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