home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / unix / aix / 13091 < prev    next >
Encoding:
Text File  |  1993-01-07  |  1.3 KB  |  42 lines

  1. Newsgroups: comp.unix.aix
  2. From: phil@dhcs.demon.co.uk (phil)
  3. Path: sparky!uunet!pipex!demon!dhcs.demon.co.uk!bill!phil
  4. Subject: Re: static data no in the symbol table?
  5. In-Reply-To: rr2b+@andrew.cmu.edu's message of 6 Jan 93 12:34:14 GMT
  6. Nntp-Posting-Host: lurch
  7. Organization: IISC, dept of hackery.
  8. References: <YfGptaS00Woi9TznQf@andrew.cmu.edu>
  9. Apparently-To: mail2news@news.demon.co.uk
  10. Date: Thu, 7 Jan 1993 14:21:46 +0000
  11. Message-ID: <PHIL.93Jan7133044@lurch.dhcs.demon.co.uk>
  12. Sender: usenet@demon.co.uk
  13. Lines: 27
  14.  
  15. In article <YfGptaS00Woi9TznQf@andrew.cmu.edu> rr2b+@andrew.cmu.edu (Robert Andrew Ryan) writes:
  16.  
  17.    It appears that under some circumstances xlc fails to output symbols for
  18.    static data.  For example, compiling:
  19. .....
  20.    static struct classheader atom_classheader = {
  21.        4,
  22.        "atom",
  23.        "atom",
  24.        0x92382,
  25.    };
  26. .......
  27.  
  28.  
  29. If atom_classheader is never referenced, I believe that the compiler is
  30. intelligent enough to regard this as a waste of space and not output this to
  31. the object file. This is really irritating if the string is something useful,
  32. such as:
  33.  
  34. static char SccsId[] = "@(#)foo.c 4.1" ;
  35.  
  36. For the above, the way round it is to declare the following:
  37.  
  38. static char *SccsId[] = { "@(#)foo.c 4.1" } ;
  39.  
  40. The compiler seems to let this through.
  41.  
  42.