Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.std.c > #6449 > unrolled thread

N2838: Types and sizes: "This changes the specification when the operand of sizeof is not an lvalue of VLA type"???

Started byAndrey Tarasevich <andreytarasevich@hotmail.com>
First post2022-11-11 20:49 -0800
Last post2022-11-13 06:42 -0800
Articles 2 — 2 participants

Back to article view | Back to comp.std.c


Contents

  N2838: Types and sizes: "This changes the specification when the operand of sizeof is not an lvalue of VLA type"??? Andrey Tarasevich <andreytarasevich@hotmail.com> - 2022-11-11 20:49 -0800
    Re: N2838: Types and sizes: "This changes the specification when the operand of sizeof is not an lvalue of VLA type"??? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2022-11-13 06:42 -0800

#6449 — N2838: Types and sizes: "This changes the specification when the operand of sizeof is not an lvalue of VLA type"???

FromAndrey Tarasevich <andreytarasevich@hotmail.com>
Date2022-11-11 20:49 -0800
SubjectN2838: Types and sizes: "This changes the specification when the operand of sizeof is not an lvalue of VLA type"???
Message-ID<tkn8li$13s2g$1@dont-email.me>
https://open-std.org/jtc1/sc22/wg14/www/docs/n2838.htm

Section "3.2.1. Rationale" of that proposal begins with

   "This changes the specification when the operand of sizeof is *not* 
an lvalue of VLA type [...]"

Note the "not" in the above sentence: "not an lvalue of VLA type".

And then it proceeds to demonstrate the proposed change with an example 
in 3.2.2 where the `sizeof` in question (whose behavior will supposedly 
change) is clearly applied to an lvalue of VLA type!

So, what is that "not" doing in the initial sentence of 3.2.1? Is this 
just a typo/miswording? Or am I missing something about the intended 
meaning of that sentence?

-- 
Best regards,
Andrey

[toc] | [next] | [standalone]


#6450

FromTim Rentsch <tr.17687@z991.linuxsc.com>
Date2022-11-13 06:42 -0800
Message-ID<86tu32ex11.fsf@linuxsc.com>
In reply to#6449
Andrey Tarasevich <andreytarasevich@hotmail.com> writes:

> https://open-std.org/jtc1/sc22/wg14/www/docs/n2838.htm
>
> Section "3.2.1. Rationale" of that proposal begins with
>
>   "This changes the specification when the operand of sizeof is
> *not* an lvalue of VLA type [...]"
>
> Note the "not" in the above sentence:  "not an lvalue of VLA type".
>
> And then it proceeds to demonstrate the proposed change with an
> example in 3.2.2 where the `sizeof` in question (whose behavior will
> supposedly change) is clearly applied to an lvalue of VLA type!
>
> So, what is that "not" doing in the initial sentence of 3.2.1?  Is
> this just a typo/miswording?  Or am I missing something about the
> intended meaning of that sentence?

My reading of that statement in 3.2.1 is that it is wrong.  The
change proposed in 3.2 /does/ affect the semantics of sizeof with
an operand that is an lvalue of VLA type, and also, AFAICT, does
/not/ affect the semantics of sizeof with any other kind of
operand.  As to what may have caused it, I have nothing new to
offer.

<editorial-comment>
The proposal document is poorly written.  The changes proposed
are either poorly written or poorly thought out, perhaps both.
Sadly I believe the overall quality of the proposal is indicative
of what is going on in the ISO C standard more generally.
</editorial-comment>

[toc] | [prev] | [standalone]


Back to top | Article view | comp.std.c


csiph-web