Path: csiph.com!au2pb.net!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: Unspecified behavior in C Date: Tue, 04 Aug 2015 19:27:48 -0700 Organization: None to speak of Lines: 37 Message-ID: References: <353ff1a5-5e38-4791-9e5b-2c3d6589079c@googlegroups.com> <55A2AE38.3010002@verizon.net> <7be04ed7-d12b-41a5-9d9f-7c70b20936ea@googlegroups.com> <1622f824-7bca-4214-8768-86abf1c5d867@googlegroups.com> <82f9a602-1177-4a53-bfe6-3be2fa7ac76d@googlegroups.com> <4938af2d-22ef-4887-8538-129ee573557e@googlegroups.com> <8d3d7a31-90d4-4e81-bdd3-0e82fa5f970a@googlegroups.com> <55BFA42D.9000406@verizon.net> <7bac9a68-ea29-4022-9c6d-eb1f9211e130@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx02.eternal-september.org; posting-host="945944de09706c9b4e29b53c9d2efdc2"; logging-data="19712"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+B7Iod/NbZsidudIuywbyP" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:KmOg2FPatqihfXSR1GrSO6jRXPA= sha1:jSCThcXaVqY8/VrXHP2NDueSfHg= Xref: csiph.com comp.lang.c:66899 David Kleinecke writes: > On Monday, August 3, 2015 at 6:34:25 PM UTC-7, Keith Thompson wrote: >> David Kleinecke writes: >> > On Monday, August 3, 2015 at 10:26:14 AM UTC-7, James Kuyper wrote: >> [...] >> > putchar('a') + putchar ('b') >> > >> > Neat. But what does "final result" mean exactly? They both got printed - >> > in what order is of no concern to the program. >> >> Haven't you been saying that you want the unspecified order of >> evaluation of the two operands of "+" to be implementation-defined? >> > > Is '+' a function? I don't think it is in C (any version). No, of course not. Why do you ask? The order of evaluation of the arguments in a function call is unspecified. Similarly, the order of evaluation of the operands of the + operator is unspecified. My impression is that you want both to be implementation-defined rather than unspecified. In fact, I think you've said that *all* unspecified behavior should be implementation-defined. As I recall, I (or perhaps someone else) chose to focus on function arguments as a concrete example. Did I misunderstand you? (It's entirely possible that I did.) -- Keith Thompson (The_Other_Keith) kst-u@mib.org 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"