public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: bangerth@dealii.org To: gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, struppi@acm.org Subject: Re: c++/8633: [3.3 regression] typedefs as base classes Date: Mon, 25 Nov 2002 15:36:00 -0000 [thread overview] Message-ID: <20021119151311.31232.qmail@sources.redhat.com> (raw) Old Synopsis: g++ doesn't resolve typedefs of templated classes properly New Synopsis: [3.3 regression] typedefs as base classes State-Changed-From-To: open->analyzed State-Changed-By: bangerth State-Changed-When: Tue Nov 19 07:13:10 2002 State-Changed-Why: Confirmed. This is a reduced testcase: ----------------------- namespace NS { class X {}; typedef X Y; } struct Base : virtual public NS::Y { Base() : NS::Y() {} }; ------------------------- The messages are tmp/g> /home/bangerth/bin/gcc-3.3x-pre/bin/c++ x.cc x.cc: In constructor `Base::Base()': x.cc:7: error: type `NS::Y' is not a direct or virtual base of `Base' I am unsure whether the code is illegal: 10.1 states that the names of base classes shall be class names, so a typedef may not qualify. However, gcc should then tell us so at the point of the base class list, not in the constructor. What is also suspicious is that the error goes away if one makes the base class non-virtual or moves X and Y into the global namespace. Something's wrong here. I can compile the testcase above with 2.95 and 3.2.1pre, so assuming it is legal, it is a regression. I thus raise its priority. If it is not legal, someone will give an explanation of this inconsistent behavior. http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8633
next reply other threads:[~2002-11-19 15:13 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-11-25 15:36 bangerth [this message] 2002-12-01 10:54 mmitchel 2002-12-01 12:33 mmitchel
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=20021119151311.31232.qmail@sources.redhat.com \ --to=bangerth@dealii.org \ --cc=gcc-bugs@gcc.gnu.org \ --cc=gcc-gnats@gcc.gnu.org \ --cc=gcc-prs@gcc.gnu.org \ --cc=nobody@gcc.gnu.org \ --cc=struppi@acm.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).