This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: a warning to implement
- From: Gabriel Dos Reis <gdr at codesourcery dot com>
- To: Bernard Dautrevaux <Dautrevaux at microprocess dot com>
- Cc: "'Gabriel Dos Reis'" <gdr at codesourcery dot com>, nathan at cs dot bris dot ac dot uk, Robert Dewar <dewar at gnat dot com>, rsandifo at redhat dot com, gcc at gcc dot gnu dot org
- Date: 08 Feb 2002 17:19:38 +0100
- Subject: Re: a warning to implement
- Organization: CodeSourcery, LLC
- References: <17B78BDF120BD411B70100500422FC6309E472@IIS000>
Bernard Dautrevaux <Dautrevaux@microprocess.com> writes:
[...]
| > The following is OK:
| >
| > struct Node {
| > Node* link;
| > Node(Node& n) : link(&n) { }
| > };
| >
| > int main()
| > {
| > T x = x;
| > }
| >
| > and is a canonical example of use for user-defined-type.
|
| I think here we should REALLY had a warning;
I'm of the opposite opinion. Warning for what?
| in fact you have here a class which explicitely do NOT have a
| default constructor,
So what?
The class is defined to meet specific needs. The default constructor
isn't part of that need. So why should there be one?
| and then we create an
| un-constructed object value.
That is nonsense.
-- Gaby