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