Path: csiph.com!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Tim Rentsch
Newsgroups: comp.lang.c++
Subject: Re: is "x *= ++f * ++f" a valid statement ?
Date: Tue, 23 Jul 2024 07:28:44 -0700
Organization: A noiseless patient Spider
Lines: 18
Message-ID: <86ttgg41yb.fsf@linuxsc.com>
References: <96127c8d8d204b7c3230828101bc2b6e@www.novabbs.org> <877cdchj2i.fsf@nosuchdomain.example.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Date: Tue, 23 Jul 2024 16:28:45 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="7d13b34d8c99e76fe2e42ca3bbf07909"; logging-data="1304783"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+vCFb7MjggwkhscK302+Dcyj5sTSYBat0="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:8TcsQ/RCzPYX2zjNwiJ5gBFnjK4= sha1:L3ph/AlF6fiXcVQLZlG2R9qh9qQ=
Xref: csiph.com comp.lang.c++:119728
Keith Thompson writes:
> James Kuyper writes:
[...]
>> A minor detail is that a variable must be declared, whereas memory
>> locations can, for instance, be part of allocated memory for which
>> no declaration exists - it is still undefined behavior to write
>> code that applies unsequence side-effects to such memory locations.
>
> Digression: I'm not even sure what "variable" means in C++. The
> standard defines the term, but not in a way that really tells us
> what it means.
>
> "A *variable* is introduced by the declaration of a reference other
> than a non-static data member or of an object. The variable's name,
> if any, denotes the reference or object."
What part do you find confusing or hard to understand?