From: llewelly@xmission.com
To: Ken Foskey <foskey@optushome.com.au>
Cc: gcc help <gcc-help@gcc.gnu.org>
Subject: Re: unitialised error
Date: Fri, 02 Jul 2004 13:45:00 -0000 [thread overview]
Message-ID: <s3r65964j6b.fsf@solaris.xmission.com> (raw)
In-Reply-To: <1088755433.25475.24.camel@froddo.foskey.org.au>
Ken Foskey <foskey@optushome.com.au> writes:
> On Fri, 2004-07-02 at 15:35, llewelly@xmission.com wrote:
>
> > However I get no such warnings for the same code, not with gcc 3.4,
> > 3.3.3, or very old 2.95.3 .
>
> You need to turn on optimisation and -Wuninitialized
I had optimization and -Wuninitialized. Here was the full compile
line:
cd /home/llewelly/llewelly/cc_moderated/
g++-3.4 -O2 -W -Wall -Wuninitialized foskey.cc
Compilation finished at Fri Jul 2 07:41:03
(I just re-verified)
Maybe the surrounding code you didn't paste affected the diagnostic. I
completed your original example like this:
int main()
{
int nXIndex;
int nCol;
int Tmp;
int *pTmp;
switch( nXIndex & 3 )
{
case 0 :
nCol = *pTmp >> 6;
break;
case 1 :
nCol = ( *pTmp >> 4 ) & 0x03 ;
break;
case 2 :
nCol = ( *pTmp >> 2 ) & 0x03;
break;
case 3 :
nCol = ( *pTmp++ ) & 0x03;
break;
}
Tmp= nCol;
}
prev parent reply other threads:[~2004-07-02 13:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-01 12:05 Ken Foskey
2004-07-01 16:22 ` llewelly
2004-07-01 20:48 ` Falk Hueffner
2004-07-02 5:35 ` llewelly
2004-07-02 8:03 ` Ken Foskey
2004-07-02 13:45 ` llewelly [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=s3r65964j6b.fsf@solaris.xmission.com \
--to=llewelly@xmission.com \
--cc=foskey@optushome.com.au \
--cc=gcc-help@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).