I didn't write that line of code and certainly would not have implemented
things in that manner. I did, however, get stuck with finding why the app
was dumping core with a protection violation and that was the culprit.

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).

But, yes, I'm going to give you flak for assuming that I *deserved* the 3
hours of sleuthing to discover this (the point of nuking was in an entirely
different routine, deep inside the Qt X event code).

Ciao,
Dee

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Jason Teagle
Sent: Monday, March 22, 2004 2:26 PM
To: [EMAIL PROTECTED]
Subject: RE: [OT] gcc & QT (was Re: RE: [msvc] using bit fields)


> QString cname = getCompanyName(cname);

I'm going to get some flak for this, but I say you got what you deserve. In
the strictest sense, yes, the compiler should have implemented to the letter
of the standard; but c'mon, to deliberately try and exercise the more
nitty-gritty parts of the standard by relying on use of the correct ctor
(your previous e-mail) and now intialization of variable complete before
right-hand side 'executes', presumably just to save an extra line of code...
I say the compiler got its own back and rightly so {;v)



--
Jason Teagle
[EMAIL PROTECTED]



_______________________________________________
msvc mailing list
[EMAIL PROTECTED]
See http://beginthread.com/mailman/listinfo/msvc_beginthread.com for
subscription changes, and list archive.



Reply via email to