home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.hp
- Path: sparky!uunet!paladin.american.edu!darwin.sura.net!newsserver.jvnc.net!newsserver.technet.sg!nuscc!matcsp
- From: matcsp@nuscc.nus.sg (Chan Shih-Ping)
- Subject: Help: <stdarg.h> and gcc
- Message-ID: <1993Jan13.014554.8485@nuscc.nus.sg>
- Organization: National University of Singapore
- X-Newsreader: Tin 1.1 PL4
- Date: Wed, 13 Jan 1993 01:45:54 GMT
- Lines: 24
-
- Machine is HP 9000/720 running HP-UX 8.05.
-
- When I compile a program using <stdarg.h> and the pre-built gcc2.3.2 from
- ftp.csc.liv.ac.uk, there is an external symbol __builtin_va_start which
- is undefined. This causes the link to fail. An object file created using
- the HP compiler in ANSI mode does not have the external symbol defined.
-
- How can I get gcc to expand the va_start macro correctly?
-
- /* Code fragment */
- void fatal(char *str, ...)
- {
- va_list valist;
-
- va_start(str, valist);
- /* Under gcc the preceding line defines a symbol __builtin_va_start */
- /* No such symbol using cc -Aa */
- vfprintf(stderr, str, valist);
- va_end(valist);
- exit(1);
- }
- Thanks for any help that you can give. I would really like to get gcc
- working.
-
-