[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#40671: [DOC] modify literal objects
From: |
Paul Eggert |
Subject: |
bug#40671: [DOC] modify literal objects |
Date: |
Fri, 24 Apr 2020 20:20:08 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 |
On 4/24/20 7:40 PM, Dmitry Gutov wrote:
>> That depends on what other programming languages we're talking about. The
>> current use of 'constant' in the manual corresponds reasonably closely to
>> 'const' objects in C and C++.
>
> Since we're talking about non-scalar values, do you mean constant pointers to
> (generally) mutable objects? Or a constant aggregate of mutable objects?
Neither. I mean a constant object, e.g., the array of chars denoted by the
string literal "abc" in C.
> When a value is constant in C or C++, you can't change it.
Yes, you can't change it in a portable program, because if you attempt to change
it the resulting behavior is undefined. The attempt might succeed so that the
"constant" is changed, or you might get a core dump, or you might get an
exception, or something else might happen.
- bug#40671: [DOC] modify literal objects, (continued)
- bug#40671: [DOC] modify literal objects, Drew Adams, 2020/04/20
- bug#40671: [DOC] modify literal objects, Paul Eggert, 2020/04/22
- bug#40671: [DOC] modify literal objects, Michael Heerdegen, 2020/04/22
- bug#40671: [DOC] modify literal objects, Richard Stallman, 2020/04/23
- bug#40671: [DOC] modify literal objects, Drew Adams, 2020/04/24
- bug#40671: [DOC] modify literal objects, Paul Eggert, 2020/04/24
- bug#40671: [DOC] modify literal objects, Mattias EngdegÄrd, 2020/04/24
- bug#40671: [DOC] modify literal objects, Dmitry Gutov, 2020/04/24
- bug#40671: [DOC] modify literal objects, Paul Eggert, 2020/04/24
- bug#40671: [DOC] modify literal objects, Dmitry Gutov, 2020/04/24
- bug#40671: [DOC] modify literal objects,
Paul Eggert <=
- bug#40671: [DOC] modify literal objects, Dmitry Gutov, 2020/04/25
- bug#40671: [DOC] modify literal objects, Paul Eggert, 2020/04/25
- bug#40671: [DOC] modify literal objects, Dmitry Gutov, 2020/04/26
- bug#40671: [DOC] modify literal objects, Eli Zaretskii, 2020/04/26
- bug#40671: [DOC] modify literal objects, Dmitry Gutov, 2020/04/26
- bug#40671: [DOC] modify literal objects, Eli Zaretskii, 2020/04/26
- bug#40671: [DOC] modify literal objects, Dmitry Gutov, 2020/04/26
- bug#40671: [DOC] modify literal objects, Eli Zaretskii, 2020/04/26
- bug#40671: [DOC] modify literal objects, Dmitry Gutov, 2020/04/26
- bug#40671: [DOC] modify literal objects, Eli Zaretskii, 2020/04/26