🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #3908

Re: Placement of string literals

#3908
From: Hallvard B Furuseth
Date: Sun, 03 Sep 1995 19:00
26 lines
1167 bytes
In article <810140841snz@soliton.demon.co.uk> Ian Cargill <ian@soliton.demon.co.uk> writes:
> In article <42c4uu$9e5@sparcserver.lrz-muenchen.de> ua302aa@sun2.lrz-muenchen.de writes:
> 
>>Obviously, there are compilers that handle
>> 
>>   char *foo = "Hello world";
>> 
>>different from
>> 
>>   const char *bar = "Hello world";
>> 
>>as far as the placement of the string literal is concerned.
>
> (...)
> 
> There is no good reason 
> why the two strings above should be handled any differently. 

   char foo[]       = "Hello world";
   const char bar[] = "Hello world";

are treated differently, that's probably what he is thinking of.
-- 
Regards,

Hallvard
Technical Details
Message-ID: <HBF.95Sep3210011@durin.uio.no>
Path: arc1-ca.pugleaf.net!nntp.uio.no!usenet
References: <42c4uu$9e5@sparcserver.lrz-muenchen.de> <810140841snz@soliton.demon.co.uk>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!nntp.uio.no!usenet
From: h.b.furuseth@usit.uio.no (Hallvard B Furuseth)
Newsgroups: comp.std.c
Subject: Re: Placement of string literals
Date: 3 Sep 1995 19:00:14 GMT
Organization: University of Oslo, Norway
Distribution: world
Message-ID: <HBF.95Sep3210011@durin.uio.no>
References: <42c4uu$9e5@sparcserver.lrz-muenchen.de> <810140841snz@soliton.demon.co.uk>
NNTP-Posting-Host: durin.uio.no
In-reply-to: Ian Cargill's message of Sun, 03 Sep 95 15:07:21 GMT