home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / std / c / 3054 < prev    next >
Encoding:
Text File  |  1992-11-22  |  1.4 KB  |  36 lines

  1. Newsgroups: comp.std.c
  2. Path: sparky!uunet!spool.mu.edu!umn.edu!csus.edu!borland.com!sjc
  3. From: sjc@borland.com (Steve Correll)
  4. Subject: Re: Memory Usage by C
  5. Message-ID: <1992Nov23.055611.11753@borland.com>
  6. Originator: sjc@genghis.borland.com
  7. Sender: news@borland.com (News Admin)
  8. Organization: Borland International
  9. References: <1992Nov19.190526.26770@den.mmc.com> <1992Nov20.020950.15516@nntpd.lkg.dec.com>
  10. Date: Mon, 23 Nov 1992 05:56:11 GMT
  11. Lines: 23
  12.  
  13. In article <1992Nov20.020950.15516@nntpd.lkg.dec.com> diamond@jit.dec.com (Norman Diamond) writes:
  14. >In article <1992Nov19.190526.26770@den.mmc.com> richard@crowded-house.den.mmc.com (Richard Armstrong) writes:
  15. >>Are literals always stored in the same location in memory?
  16. >
  17. >The standard says that identical string literals need not be distinct...
  18. >
  19. >>(IBM-PC,Borland)
  20. >
  21. >Ask Borland...
  22. >
  23. >>For instance, is the string a stored in the same place in the following
  24. >>two declarations?:
  25. >>static char *a[]="ABC";
  26. >>funca()
  27. >>{
  28. >>char *a[]="ABC";
  29. >>}
  30.  
  31. Ask and ye shall receive: whether the Borland compiler overlays duplicate string
  32. literals within this compilation depends on the "-d" flag (or, for the IDE, the
  33. OPTIONS|COMPILER|CODEGENERATION menu). The compiler will complain about the
  34. absence of {} around the string (perhaps you meant to say "char a[]" or "char
  35. *a" rather than "char *a[]"?) due to section 3.5.7 of the standard.
  36.