Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #126675
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Keith Thompson <kst-u@mib.org> |
| Newsgroups | comp.lang.c |
| Subject | Re: The bug |
| Date | Tue, 13 Feb 2018 11:44:13 -0800 |
| Organization | None to speak of |
| Lines | 28 |
| Message-ID | <lnbmgsptde.fsf@kst-u.example.com> (permalink) |
| References | <p5ignt$45g$1@dont-email.me> <p5uaug$orp$1@dont-email.me> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8 |
| Content-Transfer-Encoding | 8bit |
| Injection-Info | reader02.eternal-september.org; posting-host="687e3fdc1719f9ca714ff8931aee93b3"; logging-data="16648"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19m7hGwk4eNfA/MZ0JS4Kks" |
| User-Agent | Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) |
| Cancel-Lock | sha1:8clPqB5hpnxomVnT5adbdSwodug= sha1:2NkPmY7GS4zEceJJnDrMW9NeLGw= |
| Xref | csiph.com comp.lang.c:126675 |
Show key headers only | View raw
jacobnavia <jacob@jacob.remcomp.fr> writes:
> Le 08/02/2018 à 22:50, jacobnavia a écrit :
>> Consider this program:
[snip]
>> Compiled without any optimizations, this program outputs nothing. Gcc
>> with -O2 will print "bug".
>>
>> Why is this happening?
>>
>
> I found the root cause: gcc/clang will assume that there is no "UB" i.e.
> no overflow. Then, a multiplication of two unsigned values into a signed
> result can't be negative.
*You* found the root cause? I posted the explanation last Thursday.
If you've killfiled me, you're free to do so, but I'd like to know about
it so I don't waste my time.
Can someone post a followup to this so jacob sees it? I'll also mention
that I recently posted an lcc-win bug report in comp.compilers.lcc;
jacob might have missed that as well.
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Working, but not speaking, for JetHead Development, Inc.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
The bug jacobnavia <jacob@jacob.remcomp.fr> - 2018-02-08 22:50 +0100
Re: The bug Keith Thompson <kst-u@mib.org> - 2018-02-08 14:15 -0800
Re: The bug jacobnavia <jacob@jacob.remcomp.fr> - 2018-02-13 10:25 +0100
Re: The bug David Brown <david.brown@hesbynett.no> - 2018-02-13 10:51 +0100
Re: The bug jacobnavia <jacob@jacob.remcomp.fr> - 2018-02-13 11:19 +0100
Re: The bug David Brown <david.brown@hesbynett.no> - 2018-02-13 12:23 +0100
Re: The bug Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2018-02-13 08:19 -0800
Re: The bug David Brown <david.brown@hesbynett.no> - 2018-02-15 10:52 +0100
Re: The bug Noob <root@127.0.0.1> - 2018-02-13 16:19 +0100
Re: The bug Tim Rentsch <txr@alumni.caltech.edu> - 2018-02-19 12:11 -0800
Re: The bug supercat@casperkitty.com - 2018-02-19 16:31 -0800
Re: The bug Tim Rentsch <txr@alumni.caltech.edu> - 2018-02-21 23:03 -0800
Re: The bug supercat@casperkitty.com - 2018-02-23 16:40 -0800
Re: The bug Richard Damon <Richard@Damon-Family.org> - 2018-02-24 05:57 -0500
Re: The bug Tim Rentsch <txr@alumni.caltech.edu> - 2018-02-24 13:11 -0800
Re: The bug Anton Shepelev <anton.txt@gmail.com> - 2018-02-25 00:15 +0300
Re: The bug Keith Thompson <kst-u@mib.org> - 2018-02-13 11:44 -0800
Re: The bug asetofsymbols@gmail.com - 2018-02-13 12:13 -0800
Re: The bug Noob <root@127.0.0.1> - 2018-02-15 09:45 +0100
csiph-web