Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | Keith Thompson <kst-u@mib.org> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: OT: One of Anton's papers makes Hacker News |
| Date | 2016-03-14 16:17 -0700 |
| Organization | None to speak of |
| Message-ID | <ln37rsk5td.fsf@kst-u.example.com> (permalink) |
| References | (11 earlier) <nc51as$r2l$2@dont-email.me> <lnbn6hluo0.fsf@kst-u.example.com> <c3ff70f8-f306-44d6-8298-0bb97e2c1ef7@googlegroups.com> <lnbn6gk9li.fsf@kst-u.example.com> <f36577e7-4b6a-415d-b983-56308f4520ed@googlegroups.com> |
supercat@casperkitty.com writes:
> On Monday, March 14, 2016 at 4:56:01 PM UTC-5, Keith Thompson wrote:
>> I disagree. If I'm writing a C program (even if I were writing it in
>> the 1980s), 99% of the time I *do not care* what sequence of loads,
>> stores, and arithmetic operations the compiler generates. I care only
>> that the resulting code does what I specified. (The 1% of the time that
>> I do care, it's because I'm debugging the behavior of the code on a
>> lower level than is usually necessary.)
>
> Programmers wouldn't generally have cared about the order in which the
> operations physically took place in situations where it wasn't observable,
> but would have expected that the program should behave as though the
> operations took place in the order indicated except in cases where the
> compiler might document otherwise (typically as a consequence of enabling
> optimizations).
[...]
I'm not talking about reordering. I mean that I don't care about the
CPU instructions generated for a given piece of C code, any more than
I care whether the CPU is built using silicon or gallium arsenide.
C code specifies behavior; CPU instructions are merely a way to
implement that behavior.
Your concerns about aliasing are a different issue. If C were
specified in exactly the way you want it to be, it would still
specify the behavior of a C program. The operations you're talking
about aren't CPU instructions (though they may or may not be
straightforwardly implemented that way).
--
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
Re: OT: One of Anton's papers makes Hacker News Albert van der Horst <albert@spenarnc.xs4all.nl> - 2016-03-13 12:27 +0000
Re: OT: One of Anton's papers makes Hacker News raltbos@xs4all.nl (Richard Bos) - 2016-03-13 13:50 +0000
Re: OT: One of Anton's papers makes Hacker News Albert van der Horst <albert@spenarnc.xs4all.nl> - 2016-03-13 19:52 +0000
Re: OT: One of Anton's papers makes Hacker News Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-03-13 16:08 -0400
Re: OT: One of Anton's papers makes Hacker News Keith Thompson <kst-u@mib.org> - 2016-03-13 13:40 -0700
Re: OT: One of Anton's papers makes Hacker News Bernd Paysan <bernd.paysan@gmx.de> - 2016-03-14 00:41 +0000
Re: OT: One of Anton's papers makes Hacker News Keith Thompson <kst-u@mib.org> - 2016-03-13 18:23 -0700
Re: OT: One of Anton's papers makes Hacker News Bernd Paysan <bernd.paysan@gmx.de> - 2016-03-14 02:59 +0000
Re: OT: One of Anton's papers makes Hacker News Keith Thompson <kst-u@mib.org> - 2016-03-13 20:29 -0700
Re: OT: One of Anton's papers makes Hacker News Bernd Paysan <bernd.paysan@gmx.de> - 2016-03-14 22:44 +0000
Re: OT: One of Anton's papers makes Hacker News Keith Thompson <kst-u@mib.org> - 2016-03-14 16:23 -0700
Re: OT: One of Anton's papers makes Hacker News Jan Coombs <jenfhaomndgfwutc@murmic.plus.com> - 2016-03-14 23:55 +0000
Re: OT: One of Anton's papers makes Hacker News Keith Thompson <kst-u@mib.org> - 2016-03-14 17:19 -0700
Re: OT: One of Anton's papers makes Hacker News Malcolm McLean <malcolm.mclean5@btinternet.com> - 2016-03-15 03:06 -0700
Re: OT: One of Anton's papers makes Hacker News Keith Thompson <kst-u@mib.org> - 2016-03-15 08:47 -0700
Re: OT: One of Anton's papers makes Hacker News Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-03-15 11:59 -0400
Re: OT: One of Anton's papers makes Hacker News Malcolm McLean <malcolm.mclean5@btinternet.com> - 2016-03-15 09:34 -0700
Re: OT: One of Anton's papers makes Hacker News supercat@casperkitty.com - 2016-03-15 11:17 -0700
Re: OT: One of Anton's papers makes Hacker News Jerry Stuckle <jstucklex@attglobal.net> - 2016-03-15 12:41 -0400
Re: OT: One of Anton's papers makes Hacker News Malcolm McLean <malcolm.mclean5@btinternet.com> - 2016-03-15 10:54 -0700
Re: OT: One of Anton's papers makes Hacker News supercat@casperkitty.com - 2016-03-15 11:18 -0700
Re: OT: One of Anton's papers makes Hacker News Jerry Stuckle <jstucklex@attglobal.net> - 2016-03-15 14:42 -0400
Re: OT: One of Anton's papers makes Hacker News supercat@casperkitty.com - 2016-03-15 11:54 -0700
Re: OT: One of Anton's papers makes Hacker News Jerry Stuckle <jstucklex@attglobal.net> - 2016-03-15 16:11 -0400
Re: OT: One of Anton's papers makes Hacker News Jerry Stuckle <jstucklex@attglobal.net> - 2016-03-15 16:13 -0400
Re: OT: One of Anton's papers makes Hacker News Robert Wessel <robertwessel2@yahoo.com> - 2016-03-15 16:18 -0500
Re: OT: One of Anton's papers makes Hacker News Stephen Sprunk <stephen@sprunk.org> - 2016-03-15 15:37 -0500
Re: OT: One of Anton's papers makes Hacker News Jerry Stuckle <jstucklex@attglobal.net> - 2016-03-15 16:42 -0400
Re: OT: One of Anton's papers makes Hacker News Robert Wessel <robertwessel2@yahoo.com> - 2016-03-14 19:26 -0500
Re: OT: One of Anton's papers makes Hacker News Bernd Paysan <bernd.paysan@gmx.de> - 2016-03-15 00:48 +0000
Re: OT: One of Anton's papers makes Hacker News Keith Thompson <kst-u@mib.org> - 2016-03-14 22:30 -0700
Re: OT: One of Anton's papers makes Hacker News anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-03-15 07:23 +0000
Re: OT: One of Anton's papers makes Hacker News Albert van der Horst <albert@spenarnc.xs4all.nl> - 2016-03-15 10:09 +0000
Re: OT: One of Anton's papers makes Hacker News Richard Damon <Richard@Damon-Family.org> - 2016-03-15 08:19 -0400
Re: OT: One of Anton's papers makes Hacker News Keith Thompson <kst-u@mib.org> - 2016-03-15 08:56 -0700
Re: OT: One of Anton's papers makes Hacker News Albert van der Horst <albert@spenarnc.xs4all.nl> - 2016-03-15 19:33 +0000
Re: OT: One of Anton's papers makes Hacker News Rosario19 <Ros@invalid.invalid> - 2016-03-17 09:46 +0100
Re: OT: One of Anton's papers makes Hacker News Jerry Stuckle <jstucklex@attglobal.net> - 2016-03-17 09:37 -0400
Re: OT: One of Anton's papers makes Hacker News Rosario19 <Ros@invalid.invalid> - 2016-03-17 18:40 +0100
Re: OT: One of Anton's papers makes Hacker News Jerry Stuckle <jstucklex@attglobal.net> - 2016-03-17 13:53 -0400
Re: OT: One of Anton's papers makes Hacker News supercat@casperkitty.com - 2016-03-17 11:53 -0700
Re: OT: One of Anton's papers makes Hacker News Jerry Stuckle <jstucklex@attglobal.net> - 2016-03-17 19:58 -0400
Re: OT: One of Anton's papers makes Hacker News Rosario19 <Ros@invalid.invalid> - 2016-03-17 18:37 +0100
Re: OT: One of Anton's papers makes Hacker News Albert van der Horst <albert@spenarnc.xs4all.nl> - 2016-03-18 14:36 +0000
Re: OT: One of Anton's papers makes Hacker News Tim Rentsch <txr@alumni.caltech.edu> - 2016-03-18 08:14 -0700
Re: OT: One of Anton's papers makes Hacker News David Brown <david.brown@hesbynett.no> - 2016-03-14 09:17 +0100
Re: OT: One of Anton's papers makes Hacker News supercat@casperkitty.com - 2016-03-14 14:14 -0700
Re: OT: One of Anton's papers makes Hacker News Malcolm McLean <malcolm.mclean5@btinternet.com> - 2016-03-14 14:26 -0700
Re: OT: One of Anton's papers makes Hacker News supercat@casperkitty.com - 2016-03-14 14:46 -0700
Re: OT: One of Anton's papers makes Hacker News David Brown <david.brown@hesbynett.no> - 2016-03-15 10:39 +0100
Re: OT: One of Anton's papers makes Hacker News David Brown <david.brown@hesbynett.no> - 2016-03-15 10:38 +0100
Re: OT: One of Anton's papers makes Hacker News supercat@casperkitty.com - 2016-03-15 07:47 -0700
Re: OT: One of Anton's papers makes Hacker News Bernd Paysan <bernd.paysan@gmx.de> - 2016-03-14 22:56 +0000
Re: OT: One of Anton's papers makes Hacker News Robert Wessel <robertwessel2@yahoo.com> - 2016-03-14 20:00 -0500
Re: OT: One of Anton's papers makes Hacker News David Brown <david.brown@hesbynett.no> - 2016-03-15 11:22 +0100
Re: OT: One of Anton's papers makes Hacker News Malcolm McLean <malcolm.mclean5@btinternet.com> - 2016-03-14 00:43 -0700
Re: OT: One of Anton's papers makes Hacker News Richard Heathfield <rjh@cpax.org.uk> - 2016-03-14 08:06 +0000
Re: OT: One of Anton's papers makes Hacker News supercat@casperkitty.com - 2016-03-14 14:01 -0700
Re: OT: One of Anton's papers makes Hacker News Keith Thompson <kst-u@mib.org> - 2016-03-14 14:55 -0700
Re: OT: One of Anton's papers makes Hacker News supercat@casperkitty.com - 2016-03-14 15:17 -0700
Re: OT: One of Anton's papers makes Hacker News raltbos@xs4all.nl (Richard Bos) - 2016-03-14 22:40 +0000
Re: OT: One of Anton's papers makes Hacker News Jerry Stuckle <jstucklex@attglobal.net> - 2016-03-14 20:12 -0400
Re: OT: One of Anton's papers makes Hacker News Keith Thompson <kst-u@mib.org> - 2016-03-14 16:17 -0700
Re: OT: One of Anton's papers makes Hacker News supercat@casperkitty.com - 2016-03-14 23:28 -0700
Re: OT: One of Anton's papers makes Hacker News Keith Thompson <kst-u@mib.org> - 2016-03-15 00:05 -0700
Re: OT: One of Anton's papers makes Hacker News Richard Heathfield <rjh@cpax.org.uk> - 2016-03-15 08:29 +0000
Re: OT: One of Anton's papers makes Hacker News raltbos@xs4all.nl (Richard Bos) - 2016-03-14 22:38 +0000
Re: OT: One of Anton's papers makes Hacker News Randy Howard <rhoward.mx@EverybodyUsesIt.com> - 2016-03-14 01:40 -0500
Re: OT: One of Anton's papers makes Hacker News fir <profesor.fir@gmail.com> - 2016-03-15 09:24 -0700
csiph-web