This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/20293] [3.4/4.0/4.1 regression] Wrong diagnostic for ambiguous access
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Mar 2005 23:03:16 -0000
- Subject: [Bug c++/20293] [3.4/4.0/4.1 regression] Wrong diagnostic for ambiguous access
- References: <20050302221934.20293.igodard@pacbell.net>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From bangerth at dealii dot org 2005-03-02 23:03 -------
This is indeed a diagnostic problem: the access is ambiguous, but instead
of saying so gcc chooses to mention that there is no such name at all. This
happens in many places, and I believe that there must be at least half
a dozen PRs about this.
This is in fact also a regression, since before the new parser we got this:
g/x> /home/bangerth/bin/gcc-3.3*/bin/c++ -c x.cc
x.cc: In function `int main()':
x.cc:16: error: use of `hide' is ambiguous
x.cc:1: error: first declared as `hide' here
x.cc:7: error: also declared as `<unnamed>::hide' here
x.cc:16: error: parse error before `::' token
icc says this:
g/x> icc -c x.cc
x.cc(16): error: "hide" is ambiguous
F(hide::j);
^
compilation aborted for x.cc (code 2)
W.
--
What |Removed |Added
----------------------------------------------------------------------------
BugsThisDependsOn|100, 12272 |
Severity|enhancement |normal
Known to fail| |3.4.3 4.0.0 4.1.0
Known to work| |2.95 3.2 3.3
Last reconfirmed|2005-03-02 23:01:37 |2005-03-02 23:03:15
date| |
Summary|ambiguous namespace and |[3.4/4.0/4.1 regression]
|diagnostic, unamed namespace|Wrong diagnostic for
| |ambiguous access
Target Milestone|--- |3.4.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20293