This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/33516] [4.0/4.1/4.2/4.3 Regression] Rejects typedef qualified name-lookup
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Sep 2007 04:14:37 -0000
- Subject: [Bug c++/33516] [4.0/4.1/4.2/4.3 Regression] Rejects typedef qualified name-lookup
- References: <bug-33516-10053@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from bangerth at dealii dot org 2007-09-22 04:14 -------
(In reply to comment #1)
> What I can find that supports rejecting the code is:
>
> 3.4.3(1) "Qualified name lookup":
>
> "If the name found is not a class-name (clause 9) or namespace-name
> (7.3.1), the program is ill-formed."
>
> 7.1.3 "The typedef specifier" it says:
>
> "A name declared with the typedef specifier becomes a typedef-name."
>
> but then the last example should be rejected as well?
I think this isn't the problem you run into. The real problem with the
typedef is that if you use typedef_name::nested_name from within the
class that typedef_name points to, then typedef_name is still an incomplete
type because you haven't reached the closing brace yet. In your last
example, you *have* reached the closing brace and the pointed class is
complete so using typedef_name::nested_name succeeds.
W.
--
bangerth at dealii dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bangerth at dealii dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33516