RFC: Desupport -fwritable-strings

Bruce Korb bkorb@veritas.com
Mon Apr 21 18:34:00 GMT 2003


> >> <pre>
> >>     char <b>*</b>template = "/tmp/progXXXXXX";
> >>     int fd = mkstemp(template);
> >> </pre>
> >>       becomes
> >> <pre>
> >>     char template<b>[]</b> = "/tmp/progXXXXXX";
> >>     int fd = mkstemp(template);
> >
> > Please give an example in C (I don't care whether additionally or instead),
> 
> Huh? That is an example in C.

True, but a more common/clarifying problem example would be:

  string_tweaker( "constant" )

to:

  {
     static char zconst[] = "not-constant";
     string_tweaker( zconst );
  }

In the "club the nieve over the head" tradition.



More information about the Gcc-patches mailing list