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]

java/1828: error if function arg list erronously followed by a semi-colon



>Number:         1828
>Category:       java
>Synopsis:       error if function arg list erronously followed by a semi-colon
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-illegal-code
>Submitter-Id:   net
>Arrival-Date:   Thu Feb 01 05:56:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     paul@dawa.demon.co.uk
>Release:        unknown-1.0
>Organization:
>Environment:
linux
>Description:
Given the code below gcj gives an incomprehensable error
message and a compiler error eg

$ gcj -c ~/Test.java 
/home/paul/Test.java:6: Tree check: expected class 'e', have 'x' (identifier_node)
/home/paul/Test.java:6: Internal compiler error in finish_method_declaration, at parse.y:4589
Please submit a full bug report, with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.

Note the "extra" semi-colon after the getString method,
this is quite common when cut-n-pasting definitions
from interfaces

public class Test 
{
    public Test() {
    }

    public String getString();
    {
	return "";
    }
}
>How-To-Repeat:
as above
>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]