public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/20302] New: Problem with sub classes with contructors with exceptions
@ 2005-03-03 17:31 steve at netfuel dot com
2005-03-03 17:32 ` [Bug java/20302] " steve at netfuel dot com
` (5 more replies)
0 siblings, 6 replies; 8+ messages in thread
From: steve at netfuel dot com @ 2005-03-03 17:31 UTC (permalink / raw)
To: gcc-bugs
GCJ does not handle compilation of sub classes with out explicitly defined
constructors to override the super class constructors when the constructors
throw exceptions.
[steve@helios steve]$ gcj Test.java -c Test.o
Test.java: In class 'Test$1':
Test.java: In constructor '(Test,java.io.ByteArrayInputStream)':
Test.java:9: error: Exception 'java.io.IOException' must be caught, or it must
be declared in the 'throws' clause of 'Test$1'.
ObjectInputStream in = new ObjectInputStream(is)
^
Test.java:9: error: Exception 'java.io.StreamCorruptedException' must be caught,
or it must be declared in the 'throws' clause of 'Test$1'.
ObjectInputStream in = new ObjectInputStream(is)
^
2 errors
[steve@helios steve]$ gcj Test2.java -c Test2.o
Test2.java: In class 'Test2':
Test2.java: In constructor '()':
Test2.java:3: error: Exception 'java.io.IOException' must be caught, or it must
be declared in the 'throws' clause of 'Test2'.
class Test2 extends ObjectInputStream
^
1 error
--
Summary: Problem with sub classes with contructors with
exceptions
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: java
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: steve at netfuel dot com
CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20302
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug java/20302] Problem with sub classes with contructors with exceptions
2005-03-03 17:31 [Bug java/20302] New: Problem with sub classes with contructors with exceptions steve at netfuel dot com
@ 2005-03-03 17:32 ` steve at netfuel dot com
2005-03-03 17:33 ` steve at netfuel dot com
` (4 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: steve at netfuel dot com @ 2005-03-03 17:32 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From steve at netfuel dot com 2005-03-03 17:32 -------
Created an attachment (id=8317)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=8317&action=view)
Inner class test case
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20302
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug java/20302] Problem with sub classes with contructors with exceptions
2005-03-03 17:31 [Bug java/20302] New: Problem with sub classes with contructors with exceptions steve at netfuel dot com
2005-03-03 17:32 ` [Bug java/20302] " steve at netfuel dot com
@ 2005-03-03 17:33 ` steve at netfuel dot com
2005-03-03 17:55 ` steve at netfuel dot com
` (3 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: steve at netfuel dot com @ 2005-03-03 17:33 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From steve at netfuel dot com 2005-03-03 17:33 -------
Created an attachment (id=8318)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=8318&action=view)
Straigt sub class test case
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20302
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug java/20302] Problem with sub classes with contructors with exceptions
2005-03-03 17:31 [Bug java/20302] New: Problem with sub classes with contructors with exceptions steve at netfuel dot com
2005-03-03 17:32 ` [Bug java/20302] " steve at netfuel dot com
2005-03-03 17:33 ` steve at netfuel dot com
@ 2005-03-03 17:55 ` steve at netfuel dot com
2005-03-03 18:42 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: steve at netfuel dot com @ 2005-03-03 17:55 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |critical
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20302
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug java/20302] Problem with sub classes with contructors with exceptions
2005-03-03 17:31 [Bug java/20302] New: Problem with sub classes with contructors with exceptions steve at netfuel dot com
` (2 preceding siblings ...)
2005-03-03 17:55 ` steve at netfuel dot com
@ 2005-03-03 18:42 ` pinskia at gcc dot gnu dot org
2005-03-03 19:31 ` steve at netfuel dot com
2005-06-30 5:21 ` tromey at gcc dot gnu dot org
5 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-03-03 18:42 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-03-03 18:42 -------
I think this is a dup of another bug, but I am too lazy to find the bug right now.
--
What |Removed |Added
----------------------------------------------------------------------------
Severity|critical |normal
Keywords| |rejects-valid
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20302
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug java/20302] Problem with sub classes with contructors with exceptions
2005-03-03 17:31 [Bug java/20302] New: Problem with sub classes with contructors with exceptions steve at netfuel dot com
` (3 preceding siblings ...)
2005-03-03 18:42 ` pinskia at gcc dot gnu dot org
@ 2005-03-03 19:31 ` steve at netfuel dot com
2005-06-30 5:21 ` tromey at gcc dot gnu dot org
5 siblings, 0 replies; 8+ messages in thread
From: steve at netfuel dot com @ 2005-03-03 19:31 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From steve at netfuel dot com 2005-03-03 19:31 -------
I have looked for this bug and did not see one.
15501 is similar but is not the same problem or is a subset of the problems
defined in my report. As my bug also affects any Extends with Exceptions
defined in the super class constructor.
The work around is to add the overrideing constructors and call super(..)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20302
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug java/20302] Problem with sub classes with contructors with exceptions
2005-03-03 17:31 [Bug java/20302] New: Problem with sub classes with contructors with exceptions steve at netfuel dot com
` (4 preceding siblings ...)
2005-03-03 19:31 ` steve at netfuel dot com
@ 2005-06-30 5:21 ` tromey at gcc dot gnu dot org
5 siblings, 0 replies; 8+ messages in thread
From: tromey at gcc dot gnu dot org @ 2005-06-30 5:21 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From tromey at gcc dot gnu dot org 2005-06-30 05:21 -------
Note that Test2.java actually is invalid code.
Unlike anonymous constructors, implicit constructors are
not given any special treatment when it comes to 'throws'
clauses.
Test.java is valid code and should not be rejected.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2005-06-30 05:21:01
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20302
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug java/20302] Problem with sub classes with contructors with exceptions
[not found] <bug-20302-5733@http.gcc.gnu.org/bugzilla/>
@ 2007-01-09 20:52 ` tromey at gcc dot gnu dot org
0 siblings, 0 replies; 8+ messages in thread
From: tromey at gcc dot gnu dot org @ 2007-01-09 20:52 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from tromey at gcc dot gnu dot org 2007-01-09 20:47 -------
All gcj front end bugs have been fixed by the gcj-eclipse branch merge.
I'm mass-closing the affected PRs.
If you believe one of these was closed in error, please reopen it
with a note explaining why.
Thanks.
--
tromey at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20302
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2007-01-09 20:51 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-03 17:31 [Bug java/20302] New: Problem with sub classes with contructors with exceptions steve at netfuel dot com
2005-03-03 17:32 ` [Bug java/20302] " steve at netfuel dot com
2005-03-03 17:33 ` steve at netfuel dot com
2005-03-03 17:55 ` steve at netfuel dot com
2005-03-03 18:42 ` pinskia at gcc dot gnu dot org
2005-03-03 19:31 ` steve at netfuel dot com
2005-06-30 5:21 ` tromey at gcc dot gnu dot org
[not found] <bug-20302-5733@http.gcc.gnu.org/bugzilla/>
2007-01-09 20:52 ` tromey at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).