HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Compile errors at 11.0 for routine using varar...
Operating System - HP-UX
1834305
Members
1994
Online
110066
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2002 12:27 PM
02-05-2002 12:27 PM
I have some code that includes varargs.h that compiles (cc) fine at 10.20, but gives me compile errors at 11.0. I use the following command to compile it:
cc -g -z -D_HPUX_SOURCE -DPTY_ENABLE -I/usr/local/include tlp.c
but get the following errors:
cpp: "tlp.c", line 181: warning 2005: va_start: Too few parameters (1) to macro.
cpp: "tlp.c", line 863: warning 2005: va_start: Too few parameters (1) to macro.
cpp: "tlp.c", line 891: warning 2005: va_start: Too few parameters (1) to macro.
cc: "tlp.c", line 175: error 1000: Unexpected symbol: "va_dcl".
cc: "tlp.c", line 181: error 1000: Unexpected symbol: ")".
cc: "tlp.c", line 153: error 1523: Too many initializers.
cc: "tlp.c", line 181, error 1609: Incorrect usage of the va_start macro: need a
va_list variable and an identifier which is the rightmost parameter in the va_list.
I've noticed that a 10.20 the default "standard" option is -Ac, but at 11.0 it's -Aa. If I use -Ac I don't get any compile errors or warnings, but I'm afraid the executable won't run correctly on PA RISC 2.
Has anyone else seen this? Is there an easy solution (I'm sure there is; I always choose to do things the hardest possible way).
Thanks.
cc -g -z -D_HPUX_SOURCE -DPTY_ENABLE -I/usr/local/include tlp.c
but get the following errors:
cpp: "tlp.c", line 181: warning 2005: va_start: Too few parameters (1) to macro.
cpp: "tlp.c", line 863: warning 2005: va_start: Too few parameters (1) to macro.
cpp: "tlp.c", line 891: warning 2005: va_start: Too few parameters (1) to macro.
cc: "tlp.c", line 175: error 1000: Unexpected symbol: "va_dcl".
cc: "tlp.c", line 181: error 1000: Unexpected symbol: ")".
cc: "tlp.c", line 153: error 1523: Too many initializers.
cc: "tlp.c", line 181, error 1609: Incorrect usage of the va_start macro: need a
va_list variable and an identifier which is the rightmost parameter in the va_list.
I've noticed that a 10.20 the default "standard" option is -Ac, but at 11.0 it's -Aa. If I use -Ac I don't get any compile errors or warnings, but I'm afraid the executable won't run correctly on PA RISC 2.
Has anyone else seen this? Is there an easy solution (I'm sure there is; I always choose to do things the hardest possible way).
Thanks.
Solved! Go to Solution.
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2002 10:42 AM
02-12-2002 10:42 AM
Solution
Hi Tom,
The stdarg(5) man page implies that varargs(5) is nonportable. Using the macros in stdarg.h (as opposed to the function in vararg.h) should solve both your compile time errors and quell you concerns of portability.
HTH
The stdarg(5) man page implies that varargs(5) is nonportable. Using the macros in stdarg.h (as opposed to the function in vararg.h) should solve both your compile time errors and quell you concerns of portability.
HTH
[Insert humorous and/or inspirational quote here]
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP