This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Bug Report !
- To: Alexandre Oliva <aoliva at cygnus dot com>
- Subject: Re: Bug Report !
- From: Kiran-Krishna-Nadgir <c9913018 at ncb dot ernet dot in>
- Date: Mon, 8 May 2000 15:20:29 +0630 (EDT)
- cc: egcs-bugs at egcs dot cygnus dot com
HI !,
i am sorry for the small mistake actually it gave an ICE
while i was compiling the program.
On 8 May 2000, Alexandre Oliva wrote:
> On May 7, 2000, Kiran-Krishna-Nadgir <c9913018@ncb.ernet.in> wrote:
>
> > i ran the following program and got an internal compiler error.
>
> > char* const ptr = "Its me";
> > *ptr = 'i';
>
> Do you mean you got a `Segmentation Fault'? You can't get an ICE
> while you *run* a program, only while you compile it.
>
> Your code assumes string literals are modifiable, but the ISO C
> Standard says they shouldn't be assumed to be. GCC stores them in
> read-only sections, so attempts to modify them cause the error you
> observe. See -fwritable-strings.
>
> --
> Alexandre Oliva Enjoy Guaranį, see http://www.ic.unicamp.br/~oliva/
> Cygnus Solutions, a Red Hat company aoliva@{redhat, cygnus}.com
> Free Software Developer and Evangelist CS PhD student at IC-Unicamp
> oliva@{lsd.ic.unicamp.br, gnu.org} Write to mailing lists, not to me
>
>
*****************************************************************************
*****************************************************************************