Path: csiph.com!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Tim Rentsch Newsgroups: comp.lang.c++ Subject: Re: GCC hasn't even gotten around to sequencing argument evaluation yet??? Date: Mon, 25 Apr 2022 03:32:58 -0700 Organization: A noiseless patient Spider Lines: 48 Message-ID: <86o80p8nc5.fsf@linuxsc.com> References: <87wng7fdea.fsf@bsb.me.uk> <86mtgy9qj5.fsf@linuxsc.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: reader02.eternal-september.org; posting-host="2b2bd3060d7fb14ae545fc6b32585799"; logging-data="4133"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18yysGFmXvQM+vFHeVQqAZV8A3M+146kGc=" User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux) Cancel-Lock: sha1:2yAuBVmDH3utx4jEYJ8taYcklck= sha1:m7dcZ5HGhU3FGIHgRIuZTLDOL1g= Xref: csiph.com comp.lang.c++:83712 Andrey Tarasevich writes: > On 4/6/2022 8:31 AM, Tim Rentsch wrote: > >> Going just by what is stated in the C++ standard, I would say the >> question is clearly ambiguous. >> >> There is no question that the initializations of _parameters_ are >> indeterminately sequenced. But the standard does not say the >> evaluations of _argument values_ are indeterminately sequenced. >> >> The standard does use the phrase "every associated value computation >> and side effect", but AFAICT there is no definition for what that >> phrase means. Perhaps it is meant to include the evaluation of >> argument values, and perhaps it isn't. What is clear is that the >> C++ standard doesn't state which of those possibilities is the case. >> Hence, going by just what is stated in the C++ standard, it appears >> the question is clearly ambiguous. > > Taken to the extreme, by following this path we'll eventually reach > Bill Clinton's "It depends on what the meaning of the word 'is' is"... > > The language standard does not aim to be that > semantically/linguistically exhaustive. It is implied that if you > consider some part of the standard text to be unclear or ambiguous, > you are supposed to consult the rationale or the corresponding > accepted proposal for clarification. I find this assertion ridiculous. ISO produces standards documents that are meant to stand on their own, and where they do need to rely on other materials they give normative references to the other documents. If the people writing the C++ standard expect people to read the background proposals to make sense of what they write then they aren't doing their job. It seems more likely that the writing was simply careless or the editing was sloppy (or both), which would be consistent with generally poor writing seen elsewhere in the C++ standard. > In other words, the committee believes that the wording "every > associated value computation and side effect" contains no ambiguity > and sufficiently clearly conveys the intent: the argument expression > evaluations are also indeterminately sequenced. My comment isn't about what the committee believes, only about what text is present in the C++ standard. I have no reason to think you have any special insight into what the committee believes, especially since no evidence is offered in support of these fantastic claims.