This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11828] [3.4 regression] qualified dependent name looked up too early
- From: "benko at sztaki dot hu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Aug 2003 07:04:13 -0000
- Subject: [Bug c++/11828] [3.4 regression] qualified dependent name looked up too early
- References: <20030806091852.11828.benko@sztaki.hu>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11828
------- Additional Comments From benko at sztaki dot hu 2003-08-11 07:04 -------
Well, yes, the global namespace is a namespace,
but now everything is in the same namespace.
I think I've found the ultimate testcase
(the filename became non-descriptive):
hydra:~/c/proba$ cat templ_overload.cc
template <typename T> void g(T a) {::f(a);}
hydra:~/c/proba$ g++-cvs templ_overload.cc
templ_overload.cc: In function `void g(T)':
templ_overload.cc:1: error: `::f' has not been declared
zsh: exit 1 g++-cvs templ_overload.cc
hydra:~/c/proba$
(And let me add that workaround 2, though works, forces
a coding style where everything is included as late as
possible, that is, #include's are not grouped at the beginning
of a file but scattered throughout.)