public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: java/2312: Check for initialization of all final fields erronously fails
@ 2001-12-10 10:25 tromey
0 siblings, 0 replies; 3+ messages in thread
From: tromey @ 2001-12-10 10:25 UTC (permalink / raw)
To: bryce, gcc-bugs, gcc-gnats, gcc-prs, java-prs, nobody, tromey
Synopsis: Check for initialization of all final fields erronously fails
Responsible-Changed-From-To: unassigned->tromey
Responsible-Changed-By: tromey
Responsible-Changed-When: Mon Dec 10 10:25:39 2001
Responsible-Changed-Why:
I'm handling the PR.
State-Changed-From-To: open->closed
State-Changed-By: tromey
State-Changed-When: Mon Dec 10 10:25:39 2001
State-Changed-Why:
I think Per's recent check-init changes fixed this.
The example in the PR now works for me.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&pr=2312&database=gcc
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: java/2312: Check for initialization of all final fields erronously fails
@ 2001-12-10 10:36 tromey
0 siblings, 0 replies; 3+ messages in thread
From: tromey @ 2001-12-10 10:36 UTC (permalink / raw)
To: tromey; +Cc: gcc-prs
The following reply was made to PR java/2312; it has been noted by GNATS.
From: tromey@gcc.gnu.org
To: bryce@albatross.co.nz, gcc-bugs@gcc.gnu.org, gcc-gnats@gcc.gnu.org,
gcc-prs@gcc.gnu.org, java-prs@gcc.gnu.org, nobody@gcc.gnu.org,
tromey@gcc.gnu.org
Cc:
Subject: Re: java/2312: Check for initialization of all final fields erronously fails
Date: 10 Dec 2001 18:25:39 -0000
Synopsis: Check for initialization of all final fields erronously fails
Responsible-Changed-From-To: unassigned->tromey
Responsible-Changed-By: tromey
Responsible-Changed-When: Mon Dec 10 10:25:39 2001
Responsible-Changed-Why:
I'm handling the PR.
State-Changed-From-To: open->closed
State-Changed-By: tromey
State-Changed-When: Mon Dec 10 10:25:39 2001
State-Changed-Why:
I think Per's recent check-init changes fixed this.
The example in the PR now works for me.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&pr=2312&database=gcc
^ permalink raw reply [flat|nested] 3+ messages in thread
* java/2312: Check for initialization of all final fields erronously fails
@ 2001-03-17 20:56 bryce
0 siblings, 0 replies; 3+ messages in thread
From: bryce @ 2001-03-17 20:56 UTC (permalink / raw)
To: gcc-gnats
>Number: 2312
>Category: java
>Synopsis: Check for initialization of all final fields erronously fails
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Mar 17 20:56:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: Bryce McKinlay
>Release: gcc version 3.0 20010317 (prerelease)
>Organization:
>Environment:
>Description:
Compilation of the test case below fails because GCJ
falsely determines that all the classes final fields may
not have been initialized:
$ gcj -c Final.java
Final.java:11: Final variable initialization error in this constructor.
{
^
1 error
The problem appears to be with the method
check_final_variable_indirect_assignment.
The workaround below permits correct compilation, but
disables the final variable checking completely.
Index: parse.y
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/parse.y,v
retrieving revision 1.251.2.7
diff -u -r1.251.2.7 parse.y
--- parse.y 2001/03/17 21:53:11 1.251.2.7
+++ parse.y 2001/03/18 04:50:46
@@ -12271,6 +12271,10 @@
if (fbody == error_mark_node)
continue;
fbody = BLOCK_EXPR_BODY (fbody);
+
+ DECL_FUNCTION_ALL_FINAL_INITIALIZED (mdecl) = 1;
+
+ /*
if (check_final_variable_indirect_assignment (fbody) == 1)
{
DECL_FUNCTION_ALL_FINAL_INITIALIZED (mdecl) = 1;
@@ -12280,6 +12284,7 @@
parse_error_context
(lookup_cl (mdecl),
"Final variable initialization error in this constructor");
+ */
}
else
nnctor++;
>How-To-Repeat:
class Final
{
private final Integer foo;
Final (Integer f)
{
foo = f;
}
Final ()
{
this (new Integer(9));
}
}
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2001-12-10 18:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-10 10:25 java/2312: Check for initialization of all final fields erronously fails tromey
-- strict thread matches above, loose matches on Subject: below --
2001-12-10 10:36 tromey
2001-03-17 20:56 bryce
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).