public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/9355: Base class member not known by derived class constructor's initialization list
@ 2003-01-17 19:36 piotr
  0 siblings, 0 replies; 3+ messages in thread
From: piotr @ 2003-01-17 19:36 UTC (permalink / raw)
  To: gcc-gnats


>Number:         9355
>Category:       c++
>Synopsis:       Base class member not known by derived class constructor's initialization list
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Fri Jan 17 11:36:00 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Piotr Jachowicz
>Release:        gcc version 3.2 20020927 (prerelease)
>Organization:
>Environment:
gcc on cygwin on WinNT SP6
>Description:
del_spr01.cpp: In constructor `B::B()':
del_spr01.cpp:37: class `B' does not have any field named `i'
>How-To-Repeat:
class A {
public:
  int i;
};

class B : public A {
public:
  B() : i(5) {}
};
>Fix:
class A {
public:
  int i;
};

class B : public A {
public:
  B() {i = 5;}
};
>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: c++/9355: Base class member not known by derived class constructor's initialization list
@ 2003-01-21 14:56 Piotr Jachowicz
  0 siblings, 0 replies; 3+ messages in thread
From: Piotr Jachowicz @ 2003-01-21 14:56 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c++/9355; it has been noted by GNATS.

From: "Piotr Jachowicz" <piotr@jachowicz.pl>
To: bangerth@dealii.org,
	gcc-bugs@gcc.gnu.org,
	gcc-prs@gcc.gnu.org,
	nobody@gcc.gnu.org,
	piotr@jachowicz.pl,
	gcc-gnats@gcc.gnu.org
Cc:  
Subject: Re: c++/9355: Base class member not known by derived class constructor's
 initialization list
Date: Tue, 21 Jan 2003 15:46:33 +0100

 You are quite right. Sorry for the hassle
 
 Best Regards
 
 Piotrek
 
 
 
                                                                                                                                         
                       bangerth@dealii.o                                                                                                 
                       rg                       To:       gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org,                 
                                                 piotr@jachowicz.pl                                                                      
                       2003-01-17 20:39         cc:                                                                                      
                       Please respond to        Subject:  Re: c++/9355: Base class member not known by derived class constructor's       
                       bangerth; Please          initialization list                                                                     
                       respond to                                                                                                        
                       gcc-bugs; Please                                                                                                  
                       respond to                                                                                                        
                       gcc-prs; Please                                                                                                   
                       respond to                                                                                                        
                       nobody; Please                                                                                                    
                       respond to piotr;                                                                                                 
                       Please respond to                                                                                                 
                       gcc-gnats                                                                                                         
                                                                                                                                         
                                                                                                                                         
 
 
 
 
 Synopsis: Base class member not known by derived class constructor's
 initialization list
 
 State-Changed-From-To: open->closed
 State-Changed-By: bangerth
 State-Changed-When: Fri Jan 17 11:39:30 2003
 State-Changed-Why:
     That's just how C++ works. Members need to be initialized
     in the constructor of their respective class.
 
 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9355
 
 
 
 
 
 
 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: c++/9355: Base class member not known by derived class constructor's initialization list
@ 2003-01-17 19:39 bangerth
  0 siblings, 0 replies; 3+ messages in thread
From: bangerth @ 2003-01-17 19:39 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nobody, piotr

Synopsis: Base class member not known by derived class constructor's initialization list

State-Changed-From-To: open->closed
State-Changed-By: bangerth
State-Changed-When: Fri Jan 17 11:39:30 2003
State-Changed-Why:
    That's just how C++ works. Members need to be initialized
    in the constructor of their respective class.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9355


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-01-21 14:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-17 19:36 c++/9355: Base class member not known by derived class constructor's initialization list piotr
2003-01-17 19:39 bangerth
2003-01-21 14:56 Piotr Jachowicz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).