public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, Subject: Re: java/5135: Compiler segfault on non public Interfaces Date: Sun, 16 Dec 2001 17:46:00 -0000 [thread overview] Message-ID: <20011217014603.26396.qmail@sources.redhat.com> (raw) The following reply was made to PR java/5135; it has been noted by GNATS. From: Tom Tromey <tromey@redhat.com> To: olivier@zipworld.com.au Cc: gcc-gnats@gcc.gnu.org, Alexandre Petit-Bianco <apbianco@cygnus.com> Subject: Re: java/5135: Compiler segfault on non public Interfaces Date: 16 Dec 2001 18:51:24 -0700 Olivier> Note that "A" and therefore "A.Hello" are protected in Olivier> package "a" and should not be accessible from class "C". First, thanks for your report. It is concise and self-contained -- exactly how I like bug reports. I looked at this a bit today. gcj does correctly detect that A.HELLO is inaccessible, but unfortunately it crashes while trying to tell you that. The appended patch fixes the crash, but I think this patch is almost certainly incorrect. I don't really understand the code in this function. Something else I don't understand is that if you get rid of class `a.B', then the error in check_pkg_class_access is printed. Why does the presence of B make a difference here? Tom Index: parse.y =================================================================== RCS file: /cvs/gcc/gcc/gcc/java/parse.y,v retrieving revision 1.333 diff -u -r1.333 parse.y --- parse.y 2001/12/16 16:23:49 1.333 +++ parse.y 2001/12/17 01:40:13 @@ -9660,10 +9659,9 @@ if (not_accessible_p (TREE_TYPE (decl), decl, type, 0)) { parse_error_context - (qual_wfl, "Can't access %s field `%s.%s' from `%s'", + (qual_wfl, "Can't access %s `%s' from `%s'", java_accstring_lookup (get_access_flags_from_decl (decl)), - GET_TYPE_NAME (type), - IDENTIFIER_POINTER (DECL_NAME (decl)), + GET_TYPE_NAME (TREE_TYPE (decl)), IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (current_class)))); return 1; }
next reply other threads:[~2001-12-17 1:46 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2001-12-16 17:46 Tom Tromey [this message] -- strict thread matches above, loose matches on Subject: below -- 2003-05-12 19:56 Dara Hazeghi 2003-04-21 21:46 Daniel Bonniot 2001-12-16 13:56 olivier
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20011217014603.26396.qmail@sources.redhat.com \ --to=tromey@redhat.com \ --cc=gcc-prs@gcc.gnu.org \ --cc=nobody@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).