home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / sys / hp / 14809 < prev    next >
Encoding:
Text File  |  1993-01-12  |  1.1 KB  |  35 lines

  1. Newsgroups: comp.sys.hp
  2. Path: sparky!uunet!paladin.american.edu!darwin.sura.net!newsserver.jvnc.net!newsserver.technet.sg!nuscc!matcsp
  3. From: matcsp@nuscc.nus.sg (Chan Shih-Ping)
  4. Subject: Help: <stdarg.h> and gcc
  5. Message-ID: <1993Jan13.014554.8485@nuscc.nus.sg>
  6. Organization: National University of Singapore
  7. X-Newsreader: Tin 1.1 PL4
  8. Date: Wed, 13 Jan 1993 01:45:54 GMT
  9. Lines: 24
  10.  
  11. Machine is HP 9000/720 running HP-UX 8.05.
  12.  
  13. When I compile a program using <stdarg.h> and the pre-built gcc2.3.2 from
  14. ftp.csc.liv.ac.uk, there is an external symbol __builtin_va_start which
  15. is undefined. This causes the link to fail. An object file created using
  16. the HP compiler in ANSI mode does not have the external symbol defined.
  17.  
  18. How can I get gcc to expand the va_start macro correctly?
  19.  
  20. /* Code fragment */
  21. void fatal(char  *str, ...)
  22. {
  23.     va_list valist;
  24.  
  25.     va_start(str, valist); 
  26. /* Under gcc the preceding line defines a symbol __builtin_va_start */
  27. /* No such symbol using cc -Aa */
  28.     vfprintf(stderr, str, valist);
  29.     va_end(valist);
  30.     exit(1);
  31. }
  32. Thanks for any help that you can give. I would really like to get gcc
  33. working.
  34.  
  35.