🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #5955

GCC accepts multi-line strings without \ or " " &c

#5955
From: Galen Hazelwood
Date: Mon, 13 Jan 1997 00:00
36 lines
2032 bytes
The following is reproduced without comment from the Debian bug
report system.

From: Ian Jackson <ijackson@chiark.chu.cam.ac.uk>
To: Debian bugs submission address <debian-bugs@pixar.com>
Subject: GCC accepts multi-line strings without \ or " " &c

Package: gcc
Version: 2.7.2-5, 2.7.2.1-3

See the transcript below.  The authors may consider this a `language
extension', though it isn't documented in `(gcc.info.gz)Warning
Options' or `C Dialect Options' or in the table in `C Extensions'.

If so there should definitely be a separate option to generate a
warning for it, and I'd argue that -Wall ought to enable it.

chiark:~/junk> cat t.c
void spong(void) {                                    
  (void)"this is a string                                       
         with missing stuff";
}
chiark:~/junk> gcc -Wall -c t.c                                        
chiark:~/junk> gcc -Wall -ansi -c t.c                        
chiark:~/junk> gcc -Wall -pedantic -c t.c                             
t.c:2: warning: string constant runs past end of line
t.c: In function `spong':
t.c:2: warning: ANSI C forbids newline in string constant
chiark:~/junk> gcc -Wall -ansi -pedantic -c t.c
t.c:2: warning: string constant runs past end of line      
t.c: In function `spong':                   
t.c:2: warning: ANSI C forbids newline in string constant
chiark:~/junk>                                                         

Ian.
Technical Details
Message-ID: <32DAAD09.25566C65@micron.net>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 113d02,c9d3a8f40cdb1548,start
X-Google-Attributes: gid113d02,public
From: galenh@micron.net (Galen Hazelwood)
Subject: GCC accepts multi-line strings without \ or " " &c
Date: 1997/01/13
Message-ID: <32DAAD09.25566C65@micron.net>
X-Deja-AN: 209854602
sender: galen@micron.net
content-type: text/plain; charset=us-ascii
x-gateway: relay3.UU.NET from bug-gcc to gnu.gcc.bug; Mon, 13 Jan 1997 16:50:10 EST
mime-version: 1.0
newsgroups: gnu.gcc.bug
x-mailer: Mozilla 3.01 (X11; U; Linux 2.0.27 i586)