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 #174 received at 40671 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Dmitry Gutov <dgutov <at> yandex.ru>
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 18:46:11 +0300
> Cc: eggert <at> cs.ucla.edu, mattiase <at> acm.org, rms <at> gnu.org,
>  michael_heerdegen <at> web.de, ke.vigouroux <at> laposte.net, 40671 <at> debbugs.gnu.org
> From: Dmitry Gutov <dgutov <at> yandex.ru>
> Date: Sun, 26 Apr 2020 17:34:56 +0300
> 
> >    #include <string.h>
> >    int main (void) { return !strcpy ((char *)"a", "b"); }
> 
> If you go out of your way to avoid warnings, then indeed, the compiler 
> won't show them.
> 
> And typecasts are an easy way to turn compilation errors into runtime 
> errors, in general.

I think this shows the difference between CANNOT and SHOULD NOT, wrt
constants.




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

Previous Next


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