This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/13264] Function name completely hides struct in outer scope


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]