From 5325260059020357095
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,8dda5aaabdd0a59f
X-Google-Attributes: gidf78e5,public
From: seurer@rchland.ibm.com (Bill Seurer)
Subject: Re: "int x = x;" or "T t(t);" is OK?
Date: 1996/10/31
Message-ID: <55ah0g$1gp0@news.rchland.ibm.com>#1/1
X-Deja-AN: 193443853
distribution: world
x-nntp-posting-host: nordruth.rchland.ibm.com
references: <558kj7$iil@toralf.uib.no>
content-length: 780
organization: IBM Rochester MN
keywords: C++, initialization
newsgroups: comp.std.c++
originator: clamage@taumet


In article <558kj7$iil@toralf.uib.no>, boukanov@sentef2.fi.uib.no (Igor Boukanov) writes:
|> From the current DWP point of view is it possible to write: 
|> int x = x;
|> T t(t); 
|> 
|> where T has copy constructor?
|> 
|> I found that many C++ compilers accept the code without any warnings. 
|> And of cause very unfortunately from C point it is OK. 

Semantically and syntactically they are correct but of course they are
probably coding errors.  About the best you can expect (but nothing
requires it) is to get some sort of diagnostic about the use of 
uninitilized variables.
-- 

- Bill Seurer     ID Tools and Compiler Development      IBM Rochester, MN
  Business: BillSeurer@vnet.ibm.com               Home: BillSeurer@aol.com
  WWW:  http://members.aol.com/BillSeurer


[ comp.std.c++ is moderated.  To submit articles: try just posting with      ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu         ]
[ FAQ:      http://reality.sgi.com/employees/austern_mti/std-c++/faq.html    ]
[ Policy:   http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
[ Comments? mailto:std-c++-request@ncar.ucar.edu                             ]



