java/1432: jc1 doesn't seem to be able to compile from stdin anymore.
apbianco@cygnus.com
apbianco@cygnus.com
Wed Dec 20 12:26:00 GMT 2000
>Number: 1432
>Category: java
>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: Wed Dec 20 12:19:48 PST 2000
>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:
Formerly PR gcj/53
>Unformatted:
More information about the Gcc-prs
mailing list