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++/20293] [3.4/4.0/4.1 regression] Wrong diagnostic for ambiguous access


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


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