From 1330069810332867832
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,233d359668307510
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 1995-03-17 11:21:50 PST
Path: bga.com!news.sprintlink.net!pipex!sunic!sunic.sunet.se!trane.uninett.no!due.unit.no!news.unit.no!jr
From: Jarand.Roynstrand@efi.sintef.no
Newsgroups: comp.std.c++
Subject: Re: A language feature or quirk ?
Date: 17 Mar 1995 16:35:55 GMT
Organization: Norwegian Electric Power Research Institute
Lines: 37
Message-ID: <JR.95Mar17173556@efixid.efi.sintef.no>
References: <3k2tn6$jig@mozo.cc.purdue.edu> <3k4l2a$cbu@fsgm01.fnal.gov>
Reply-To: Jarand.Roynstrand@efi.sintef.no
NNTP-Posting-Host: efixid.efi.sintef.no
In-reply-to: b91926@fsgm01.fnal.gov's message of 14 Mar 1995 11:51:06 -0600

In article <3k4l2a$cbu@fsgm01.fnal.gov> b91926@fsgm01.fnal.gov (David Sachs) writes:

   Path: due.unit.no!trane.uninett.no!sunic!sunic.sunet.se!doc.news.pipex.net!pipex!howland.reston.ans.net!news.moneng.mei.com!uwm.edu!lll-winken.llnl.gov!fnnews.fnal.gov!fsgm01.fnal.gov!not-for-mail

   You have run into one of the less fortunate features of C++.

   The string "Hello" is of type char*, not const char*, as would be
   logical. There is undoubtedly too much (mostly C language) code 
   around that would be broken if the C++ language were changed to
   treat a string constant as const.

Does this mean that the standard require it to be leagal to modify
a string constant?

Would a system that gave a segmetation error on the construct

char *p ="Hello!";
p[0] = 'B';

be non-conforming?

(Please email a copy of responses to me. I am leaving office for some time.)


--

   ====				    	Best regards
     \\                             	Jarand Roeynstrand
      \\                          	DIG-hackers department
     \====\                 	
  .,;,\    \                    	EFI 
,;;;;;;;;,_/     ____        		N-7034 Trondheim
           |    |            		Norway
           |    |            
            \__/       

Phone: 	+47-73 59 72 75          	Email: jr@efi.sintef.no	


