This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/13264] Function name completely hides struct in outer scope
- From: "fw at deneb dot enyo dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 Dec 2003 22:18:55 -0000
- Subject: [Bug c++/13264] Function name completely hides struct in outer scope
- References: <20031201215301.13264.fw@deneb.enyo.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From fw at deneb dot enyo dot de 2003-12-01 22:18 -------
Subject: Re: Function name completely hides struct in outer scope
bangerth at dealii dot org wrote:
> I am not quite sure about this, but here are two clues:
> - for classes, we enter the namespace of the class in the argument
> already, i.e.
> struct X {
> typedef int T;
> void f(T);
> };
> void X::f (T) {}
> is ok: in the argument list, T is a type name local to X, but we
> enter that namespace already so find it. It would be consequent if
> the same held for namespaces as well.
I've missed the first paragraph in section 3.3.7. You are correct that
posix::stat() should be visible in the argument list (this happens just
after the declarator-id). posix::stat() then hides ::stat completely
(even the struct ::stat part).
So this is just a suboptimal diagnostic and not a real bug (IMHO).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13264