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++/12160] New: [3.4 regression] confusing error message with invalid function declaration


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

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

           Summary: [3.4 regression] confusing error message with invalid
                    function declaration
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bangerth at dealii dot org
                CC: gcc-bugs at gcc dot gnu dot org

This is totally useless: 
----------------------------------- 
struct X { 
    virtual void f(int, 
		   itn,        // typo 
		   int); 
}; 
----------------------------------- 
 
>> ~/bin/gcc-3.3/bin/c++ -c x.cc 
x.cc:3: error: type specifier omitted for parameter `itn' 
 
>> ~/bin/gcc-3.4/c++ -c x.cc 
x.cc:2: error: variable or field `f' declared void 
x.cc:2: error: `f' declared as a `virtual' field 
x.cc:2: error: expected function-definition 
 
The error message is completely unreadable and doesn't reveal where the problem 
really is. It doesn't say which parameter is misspelled, and if the parameter list 
is long and contains lots of templates and incomplete types, it doesn't help to 
to fix the problem. 
 
I rate this as a regression. 
 
W.


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