This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/19582] strtok and strtok_r do not work without -fwritable-strings


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-01-23 03:00 -------
This is invalid, see the prototype for strtok{,_r}:
     strtok_r(char *str, const char *sep, char **last);

And from the man page (from *BSD, well from darwin):
     The strtok() function is used to isolate sequential tokens in a null-ter-
     minated string, str.

So you need a writable string.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19582


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]