🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #52361

gcc-2.1 on HP9000/720 and stdarg.h

#52361
From: Josef Leherbauer
Date: Tue, 20 Oct 1992 12:42
37 lines
1354 bytes
Hi !

I compiled and installed gcc-2.1 on a HP9000/720.

The following program, compiled with GNU C, crashes:

#include <stdio.h>
#include <stdarg.h>

void f(char *fmt, ...)
{
        va_list ap;
        va_start(ap,fmt);
        vprintf(fmt, ap);
        va_end(ap);
}

main()
{
        f("%s %d %f\n", "string", 123, 123.456);
}


Is this because GNU C has a different format for variable
number of arguments or does GNU C have a bug or have I
made a mistake ?

--joe

-------------------------------------------------------
Josef Leherbauer              Phone: ++43-662-457915
takeFive Software GesmbH      Email: joe@takefive.co.at
Jakob-Haringer-Str. 8
A-5020 Salzburg
Austria
-------------------------------------------------------
Technical Details
Message-ID: <9210201242.AA00227@_joe_>
Path: arc1-ca.pugleaf.net!sparky!uunet!usc!wupost!cs.utexas.edu!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!csesbg.co.at!joe%joe

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,832f2371ae404430,start
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1992-10-20 00:53:52 PST
Newsgroups: gnu.gcc.help
Path: arc1-ca.pugleaf.net!sparky!uunet!usc!wupost!cs.utexas.edu!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!csesbg.co.at!joe%joe
From: joe%joe@csesbg.co.at (Josef Leherbauer)
Subject: gcc-2.1 on HP9000/720 and stdarg.h
Message-ID: <9210201242.AA00227@_joe_>
Sender: daemon@cis.ohio-state.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Tue, 20 Oct 1992 12:42:33 GMT
Lines: 37