public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/17788] New: poor diagnostic for missing reference initializer
@ 2004-10-01 23:59 rth at gcc dot gnu dot org
2004-10-02 12:26 ` [Bug c++/17788] " nathan at gcc dot gnu dot org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: rth at gcc dot gnu dot org @ 2004-10-01 23:59 UTC (permalink / raw)
To: gcc-bugs
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:16: error: no matching function for call to `bar::bar ()'
test.cpp:9: note: candidates are: bar::bar (const bar &)
Rather than:
test.cpp:14: error: structure `x' with uninitialized reference members
(which you get when bar doesn't inherit foo).
--
Summary: poor diagnostic for missing reference initializer
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Keywords: diagnostic
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rth at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17788
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/17788] poor diagnostic for missing reference initializer
2004-10-01 23:59 [Bug c++/17788] New: poor diagnostic for missing reference initializer rth at gcc dot gnu dot org
@ 2004-10-02 12:26 ` nathan at gcc dot gnu dot org
2004-10-02 14:00 ` pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: nathan at gcc dot gnu dot org @ 2004-10-02 12:26 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From nathan at gcc dot gnu dot org 2004-10-02 12:26 -------
confirmed. [12.1]/7 says each class gets an implicitly declared default ctor,
unless there's a user declared one. It then goes on to say that if that ctor
is illformed, it's an error when it is used.
My guess is that Mark's lazy ctor decl work might have caused this (if
it's a recent failure)
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2004-10-02 12:26:51
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17788
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/17788] poor diagnostic for missing reference initializer
2004-10-01 23:59 [Bug c++/17788] New: poor diagnostic for missing reference initializer rth at gcc dot gnu dot org
2004-10-02 12:26 ` [Bug c++/17788] " nathan at gcc dot gnu dot org
@ 2004-10-02 14:00 ` pinskia at gcc dot gnu dot org
2005-02-09 22:15 ` aoliva at gcc dot gnu dot org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-02 14:00 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-02 14:00 -------
No this is not a recent failure.
--
What |Removed |Added
----------------------------------------------------------------------------
Known to fail| |3.3.3 4.0.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17788
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/17788] poor diagnostic for missing reference initializer
2004-10-01 23:59 [Bug c++/17788] New: poor diagnostic for missing reference initializer rth at gcc dot gnu dot org
2004-10-02 12:26 ` [Bug c++/17788] " nathan at gcc dot gnu dot org
2004-10-02 14:00 ` pinskia at gcc dot gnu dot org
@ 2005-02-09 22:15 ` aoliva at gcc dot gnu dot org
2005-02-15 23:16 ` cvs-commit at gcc dot gnu dot org
2005-02-15 23:18 ` pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: aoliva at gcc dot gnu dot org @ 2005-02-09 22:15 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |aoliva at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
Last reconfirmed|2005-01-02 01:08:42 |2005-02-09 17:21:16
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17788
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/17788] poor diagnostic for missing reference initializer
2004-10-01 23:59 [Bug c++/17788] New: poor diagnostic for missing reference initializer rth at gcc dot gnu dot org
` (2 preceding siblings ...)
2005-02-09 22:15 ` aoliva at gcc dot gnu dot org
@ 2005-02-15 23:16 ` cvs-commit at gcc dot gnu dot org
2005-02-15 23:18 ` pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-02-15 23:16 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-02-15 19:39 -------
Subject: Bug 17788
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: aoliva@gcc.gnu.org 2005-02-15 19:39:31
Modified files:
gcc/cp : ChangeLog class.c
gcc/testsuite : ChangeLog
gcc/testsuite/g++.old-deja/g++.bugs: 900205_04.C
Added files:
gcc/testsuite/g++.dg/init: ctor4.C
Log message:
gcc/cp/ChangeLog:
PR c++/17788
* class.c (add_implicitly_declared_members, check_field_decl)
(check_field_decls, check_bases): Remove arguments, tests and
assignments of cant_have_default_ctor-related variables.
gcc/testsuite/ChangeLog:
PR c++/17788
* g++.dg/init/ctor4.C: New.
* g++.old-deja/g++.bugs/900205_04.C: Adjust.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4630&r2=1.4631
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/class.c.diff?cvsroot=gcc&r1=1.704&r2=1.705
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5036&r2=1.5037
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/init/ctor4.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.old-deja/g++.bugs/900205_04.C.diff?cvsroot=gcc&r1=1.4&r2=1.5
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17788
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/17788] poor diagnostic for missing reference initializer
2004-10-01 23:59 [Bug c++/17788] New: poor diagnostic for missing reference initializer rth at gcc dot gnu dot org
` (3 preceding siblings ...)
2005-02-15 23:16 ` cvs-commit at gcc dot gnu dot org
@ 2005-02-15 23:18 ` pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-15 23:18 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-02-15 19:53 -------
Fixed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.0.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17788
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-02-15 19:53 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-01 23:59 [Bug c++/17788] New: poor diagnostic for missing reference initializer rth at gcc dot gnu dot org
2004-10-02 12:26 ` [Bug c++/17788] " nathan at gcc dot gnu dot org
2004-10-02 14:00 ` pinskia at gcc dot gnu dot org
2005-02-09 22:15 ` aoliva at gcc dot gnu dot org
2005-02-15 23:16 ` cvs-commit at gcc dot gnu dot org
2005-02-15 23:18 ` pinskia at gcc dot gnu dot org
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).