Article View: gnu.gcc.bug
Article #1673va-sparc.h won't allow va_arg without va_alist
From: Rob McMahon
Date: Sat, 17 Sep 1988 19:47
Date: Sat, 17 Sep 1988 19:47
36 lines
1414 bytes
1414 bytes
GCC 1.26, sparc on a Sun4/280 running SunOS 4.0.
The definition for va_arg in va-sparc.h uses variables which are declared by
va_alist. va_list is just used as an index. This means code which should
work, like
f (va_alist)
va_dcl
{
va_list arg;
va_start (arg);
g (arg);
va_end (arg);
}
g (arg)
va_list arg;
{
char *fmt = va_arg (arg, char *);
vfprintf (stderr, fmt, arg);
}
fails with undeclared identifiers. (Forgive any typos in the above, it was
off the top of my head.)
(BTW, there are many more include files under SunOS 4.0 that need patching
than the ones dealt with by fixincludes. I just grepped for (_IO|CTRL), and
patched the lot, it caught one or two that it needn't, but it didn't do any
harm.)
Rob
--
UUCP: ...!mcvax!ukc!warwick!cudcv PHONE: +44 203 523037
JANET: cudcv@uk.ac.warwick ARPA: cudcv@warwick.ac.uk
Rob McMahon, Computing Services, Warwick University, Coventry CV4 7AL, England
Technical Details
Message-ID:
<7@orchid.warwick.ac.uk>Path:
arc1-ca.pugleaf.net!utzoo!telly!ddsw1!mcdchg!rutgers!labrea!eos!ames!amdahl!uunet!axion!ist!icdoc!ukc!warwick!cudcvShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!telly!ddsw1!mcdchg!rutgers!labrea!eos!ames!amdahl!uunet!axion!ist!icdoc!ukc!warwick!cudcv From: cudcv@warwick.ac.uk (Rob McMahon) Newsgroups: gnu.gcc.bug Subject: va-sparc.h won't allow va_arg without va_alist Message-ID: <7@orchid.warwick.ac.uk> Date: 17 Sep 88 19:47:22 GMT Reply-To: cudcv@warwick.ac.uk (Rob McMahon) Organization: Computing Services, Warwick University, UK Lines: 36