Ok, so I'm wrong. Stroustrup gives such an example on p. 83 {Sect 4.9.4, 3rd
ed} and says "int x = x;" is not illegal, just silly. He does, however,
state that "a good compiler will warn if a variable is used before it has
been set" so I suppose this means he [Stroustup] must not consider that GCC
version a "good compiler." :)I would've thought the scope started following the assignment, but that's not the case. I can't imaging a useful reason for allowing an uninitialzied reference, but I didn't write it so maybe there is something I've overlooked. Still... Ciao, Dee -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Paul Grenyer Sent: Monday, March 22, 2004 2:58 PM To: [EMAIL PROTECTED] Subject: Re: [OT] gcc & QT (was Re: RE: [msvc] using bit fields) Hi > I maintain that the compiler should have, at the very least, supplied a > warning message regarding the use of an uninitialized object reference. For > that matter, as I understand the standard, the 'cname' variable should not > even exist until after the semicolon on that line (i.e. should not be > considered in scope and referenceable). Is that in the standard? If not, can I recommend joining your local standards committee and trying to change it? I find it quite rewarding. Regards Paul Paul Grenyer Email: [EMAIL PROTECTED] Web: http://www.paulgrenyer.co.uk Have you met Aeryn: http://www.paulgrenyer.co.uk/aeryn/? Version 0.3.0 beta now ready for download _______________________________________________ msvc mailing list [EMAIL PROTECTED] See http://beginthread.com/mailman/listinfo/msvc_beginthread.com for subscription changes, and list archive.
