Bug 53453 - [2.96-98] Bad error message for invalid c++ code
Summary: [2.96-98] Bad error message for invalid c++ code
Status: CLOSED UPSTREAM
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: gcc   
(Show other bugs)
Version: 1.0
Hardware: i386 Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-09-09 15:40 UTC by Bernhard Rosenkraenzer
Modified: 2007-04-18 16:36 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-10-01 23:56:59 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description Bernhard Rosenkraenzer 2001-09-09 15:40:17 UTC
Description of Problem:
Compiling the following (invalid) code:
class foo {
public:
        foo();
};

class bar: public foo {
private:
        int &a;
};

foo::foo() {
}

int main(int argc, char **argv)
{
        bar x;
}


Returns:
test.cpp: In function `int main (int, char **)':
test.cpp:16: no matching function for call to `bar::bar ()'
test.cpp:9: candidates are: bar::bar (const bar &)

Rather than:
test.cpp:14: uninitialized reference member `bar::a'

(which you get when bar doesn't inherit foo).

Version-Release number of selected component (if applicable):
2.96-98

How Reproducible:
100%

Comment 1 Richard Henderson 2004-10-01 23:56:59 UTC
Agreed.  Pushed upstream to 
  http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17788
for tracking.


Note You need to log in before you can comment on or make changes to this bug.