home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / os / linux / 22041 < prev    next >
Encoding:
Text File  |  1992-12-29  |  1.2 KB  |  27 lines

  1. Newsgroups: comp.os.linux
  2. Path: sparky!uunet!sybus.sybus.com!myrddin!tct!chip
  3. From: chip@tct.com (Chip Salzenberg)
  4. Subject: Re: why is it with kernel 0.99 that -fwritable-strings is required
  5. Message-ID: <2B40862D.9B46@tct.com>
  6. Date: Tue, 29 Dec 1992 17:09:01 GMT
  7. References: <Bzzv0w.F9@rshark.mixcom.com> <1992Dec29.085026.14621@monu6.cc.monash.edu.au>
  8. Organization: TC Telemanagement, Clearwater, FL
  9. Lines: 16
  10.  
  11. According to parry@yoyo.cc.monash.edu.au (Tom J Parry):
  12. >Brian Kapitan (root@rshark.mixcom.com) wrote:
  13. >>why is it now, that the gcc option -fwritable-strings is required to
  14. >>correctly make certain programs, when in the past it wasn't true?
  15. >
  16. >The ANSI standard says that "C" strings are of type "const char[]".
  17.  
  18. Not so.  Otherwise, ` char *p = "foo"; ' would elicit a warning.
  19.  
  20. However, if you try to modify a string, ANSI says that you're on your
  21. own.  In other words: It's not const, but you must treat it like const.
  22. -- 
  23. Chip Salzenberg at Teltronics/TCT  <chip@tct.com>, <73717.366@compuserve.com>
  24.   "you make me want to break the laws of time and space / you make me
  25.    want to eat pork / you make me want to staple bagels to my face /
  26.    and remove them with a pitchfork" -- Weird Al Yankovic, "You Make Me"
  27.