public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: Wilco van Hoogstraeten <wilco@trimedia.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org Subject: Re: c/4302: wrong code generated Date: Wed, 12 Sep 2001 09:06:00 -0000 [thread overview] Message-ID: <20010912160601.20533.qmail@sourceware.cygnus.com> (raw) The following reply was made to PR c/4302; it has been noted by GNATS. From: Wilco van Hoogstraeten <wilco@trimedia.com> To: Andreas Jaeger <aj@suse.de> Cc: wilco@trimedia.com, gcc-gnats@gcc.gnu.org Subject: Re: c/4302: wrong code generated Date: Wed, 12 Sep 2001 08:59:01 -0700 Andreas Jaeger wrote: > wilco@trimedia.com writes: > [...] > > >Description: > > Wrong code generated: > > > > marilyn % cat tmp.i > > extern int printf( const char* args, ... ); > > > > int main( ) > > { > > long long X, Y; > > > > Y = -3000000000LL > (X = 0); > > There's no bug here: X is not initialized at this point. Therefore > the value of (X=0) is undefined, > Excuse me???? The value of (X=0) is defined and is 0. Anyway, if you do not believe in C semantics, you could have tried to initialise X before rejecting the bug: extern int printf( const char* args, ... ); % cat tmp.i int main( ) { long long X = 0, Y; Y = -3000000000LL > (X = 0); printf( "%s (%lld)\n", Y != 0 ? "FAIL" : "OK", Y ); return 0; } % gcc tmp.i % a.out FAIL (1) % Wilco.
next reply other threads:[~2001-09-12 9:06 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2001-09-12 9:06 Wilco van Hoogstraeten [this message] -- strict thread matches above, loose matches on Subject: below -- 2002-02-19 7:39 jakub 2001-09-13 9:26 Andreas Jaeger 2001-09-12 11:46 Andreas Jaeger 2001-09-11 22:36 Andreas Jaeger 2001-09-11 16:26 wilco
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=20010912160601.20533.qmail@sourceware.cygnus.com \ --to=wilco@trimedia.com \ --cc=gcc-prs@gcc.gnu.org \ --cc=nobody@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: linkBe 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).