GNU bug report logs - #40671
[DOC] modify literal objects

Previous Next

Package: emacs;

Reported by: Kevin Vigouroux <ke.vigouroux <at> laposte.net>

Date: Thu, 16 Apr 2020 20:40:02 UTC

Severity: normal

Tags: patch

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


Message #183 received at 40671 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: ke.vigouroux <at> laposte.net, eggert <at> cs.ucla.edu, 40671 <at> debbugs.gnu.org,
 michael_heerdegen <at> web.de, mattiase <at> acm.org, rms <at> gnu.org
Subject: Re: bug#40671: [DOC] modify literal objects
Date: Sun, 26 Apr 2020 20:39:38 +0300
On 26.04.2020 19:58, Eli Zaretskii wrote:
> That program demonstrates that in C one CAN change a "constant"
> array.

When you first change it to a "non-constant" one, as far as the compiler 
is concerned? It's an escape hatch. The same way you "can" funcall a string:

int main (void) {
  return ((int(*) (int))"abc")(1);
}

It will blow up at runtime, of course.

Neither will be the case with "constant" Lisp forms we are talking 
about. No runtime errors (only subtle, hard to investigate bugs from 
time to time), and no compilation warnings. The only warnings at all 
will be in the manual.




This bug report was last modified 5 years and 3 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.