This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Crush in strtok
- To: Igor Levko <hornet at reksoft dot ru>
- Subject: Re: Crush in strtok
- From: Alexandre Oliva <oliva at dcc dot unicamp dot br>
- Date: 08 Jul 1998 07:34:48 -0300
- Cc: egcs-bugs at cygnus dot com
- References: <35A33D2C.9A056B5@reksoft.ru>
Igor Levko <hornet@reksoft.ru> writes:
> Having compiled this simplest test I invoked it and got
> segmentation fault.
strtok modifies its argument, but literal strings are read-only, so
behavior is correct. You may specify -fwritable-strings, but this is
non-standard.
--
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil