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++/12582] unhelpful message with ambiguous typedef


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12582


bangerth at dealii dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gdr at gcc dot gnu dot org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2003-10-22 01:28:34
               date|                            |
            Summary|"declaration of `operator()'|unhelpful message with
                   |as non-function"            |ambiguous typedef


------- Additional Comments From bangerth at dealii dot org  2003-10-22 01:28 -------
I think this is actually a diagnostic problem. For Andrew's testcase, this is the message 
that we get from 3.3 and 3.4: 
 
tmp/g> ~/bin/gcc-3.3/bin/c++ -c x.cc 
x.cc:10: error: parse error before `&' token 
tmp/g> 
tmp/g> ../build-gcc/gcc-install/bin/c++ -c x.cc 
x.cc:10: error: declaration of `operator()' as non-function 
x.cc:10: error: expected function-definition 
 
Both don't say what's wrong. Use icc instead: 
tmp/g> icc -c x.cc 
x.cc(10): error: "float_t" is ambiguous 
      int operator()(const float_t& argument1); 
                           ^ 
 
compilation aborted for x.cc (code 2) 
 
That's the reason. In other words, the code is wrong, but gcc's error messages are 
not really helpful in discovering this. 
 
W.


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