freebsd-skq/sys/i386/include
Poul-Henning Kamp b7a652ab84 I have no idea what this is all about, but it works and Bruce hasn't
complained so it cannot be entirely bad :-)

I include the email that probably explains it for people who already know:

> >Compiling with -O3 inlines functions.  However the function that is being
> >inlined in makeinfo.c (add_word_args()) is a vararg function and must not be
> >inlined.
> >
> >The code in question is K&R style, and AFIK, there is no way for the compiler
> >to determine that the function uses vararg.  Either change the code to use
> >prototypes, or use stdarg, or add a directive to prevent inlining.
>
> Not declaring a varargs function as varargs before it is used gives
> undefined behaviour.
>
> However, in practice the bug is probably in FreeBSD's <varargs.h>, which
> doesn't use gcc's __builtin_next_arg().  gcc should notice that it is
> used and not inline functions that have it.  <stdarg.h.> uses it, but I
> think there's another gcc builtin that it should be using.

Patch attached.  The ellipsis causes gcc to flag this as a varargs function,
and the name "__builtin_va_alist" is special cased in gcc to hide the last
argument in the arglist.

Reviewed by:	bde & phk
Submitted by:	jlemon@americantv.com (Jonathan Lemon)
1997-02-07 20:22:15 +00:00
..
pc Make the long-awaited change from $Id$ to $FreeBSD$ 1997-01-14 07:20:47 +00:00
_limits.h Make the long-awaited change from $Id$ to $FreeBSD$ 1997-01-14 07:20:47 +00:00
ansi.h Make the long-awaited change from $Id$ to $FreeBSD$ 1997-01-14 07:20:47 +00:00
apm_bios.h Make the long-awaited change from $Id$ to $FreeBSD$ 1997-01-14 07:20:47 +00:00
apm_segments.h Make the long-awaited change from $Id$ to $FreeBSD$ 1997-01-14 07:20:47 +00:00
asc_ioctl.h Cleaned up all headers that include <sys/ioctl.h> or <sys/ioccom.h>: 1996-09-21 14:59:43 +00:00
asmacros.h Make the long-awaited change from $Id$ to $FreeBSD$ 1997-01-14 07:20:47 +00:00
bootinfo.h Make the long-awaited change from $Id$ to $FreeBSD$ 1997-01-14 07:20:47 +00:00
cdk.h Make the long-awaited change from $Id$ to $FreeBSD$ 1997-01-14 07:20:47 +00:00
clock.h Make the long-awaited change from $Id$ to $FreeBSD$ 1997-01-14 07:20:47 +00:00
comstats.h Make the long-awaited change from $Id$ to $FreeBSD$ 1997-01-14 07:20:47 +00:00
conf.h Pass 3 of the great devsw changes 1995-12-08 11:19:42 +00:00
cons.h Make the long-awaited change from $Id$ to $FreeBSD$ 1997-01-14 07:20:47 +00:00
console.h Make the long-awaited change from $Id$ to $FreeBSD$ 1997-01-14 07:20:47 +00:00
cpu.h Deleted i386_cpus[]. i386_cpus[] is a static variable in identcpu.c. 1997-02-02 10:43:35 +00:00
cpufunc.h Make the long-awaited change from $Id$ to $FreeBSD$ 1997-01-14 07:20:47 +00:00
cputypes.h Make the long-awaited change from $Id$ to $FreeBSD$ 1997-01-14 07:20:47 +00:00
cronyx.h Clean up Ethernet drivers: 1996-02-06 18:51:28 +00:00
db_machdep.h Fixed printing of small offsets. E.g., -4(%ebp) is now printed 1997-01-16 11:27:11 +00:00
endian.h Make the long-awaited change from $Id$ to $FreeBSD$ 1997-01-14 07:20:47 +00:00
exec.h Make the long-awaited change from $Id$ to $FreeBSD$ 1997-01-14 07:20:47 +00:00
float.h Make the long-awaited change from $Id$ to $FreeBSD$ 1997-01-14 07:20:47 +00:00
floatingpoint.h Make the long-awaited change from $Id$ to $FreeBSD$ 1997-01-14 07:20:47 +00:00
frame.h Make the long-awaited change from $Id$ to $FreeBSD$ 1997-01-14 07:20:47 +00:00
gsc.h Cleaned up all headers that include <sys/ioctl.h> or <sys/ioccom.h>: 1996-09-21 14:59:43 +00:00
ieeefp.h Make the long-awaited change from $Id$ to $FreeBSD$ 1997-01-14 07:20:47 +00:00
in_cksum.h Make the long-awaited change from $Id$ to $FreeBSD$ 1997-01-14 07:20:47 +00:00
ioctl_ctx.h Make the long-awaited change from $Id$ to $FreeBSD$ 1997-01-14 07:20:47 +00:00
ioctl_fd.h Make the long-awaited change from $Id$ to $FreeBSD$ 1997-01-14 07:20:47 +00:00
ioctl_meteor.h Cleaned up all headers that include <sys/ioctl.h> or <sys/ioccom.h>: 1996-09-21 14:59:43 +00:00
ipl.h Make the long-awaited change from $Id$ to $FreeBSD$ 1997-01-14 07:20:47 +00:00
joystick.h Cleaned up all headers that include <sys/ioctl.h> or <sys/ioccom.h>: 1996-09-21 14:59:43 +00:00
limits.h Make the long-awaited change from $Id$ to $FreeBSD$ 1997-01-14 07:20:47 +00:00
lpt.h Make the long-awaited change from $Id$ to $FreeBSD$ 1997-01-14 07:20:47 +00:00
md_var.h Make the long-awaited change from $Id$ to $FreeBSD$ 1997-01-14 07:20:47 +00:00
mouse.h Make the long-awaited change from $Id$ to $FreeBSD$ 1997-01-14 07:20:47 +00:00
mtpr.h Make the long-awaited change from $Id$ to $FreeBSD$ 1997-01-14 07:20:47 +00:00
npx.h Make the long-awaited change from $Id$ to $FreeBSD$ 1997-01-14 07:20:47 +00:00
param.h Make the long-awaited change from $Id$ to $FreeBSD$ 1997-01-14 07:20:47 +00:00
pcaudioio.h Make the long-awaited change from $Id$ to $FreeBSD$ 1997-01-14 07:20:47 +00:00
pcb.h Make the long-awaited change from $Id$ to $FreeBSD$ 1997-01-14 07:20:47 +00:00
pcvt_ioctl.h Cleaned up all headers that include <sys/ioctl.h> or <sys/ioccom.h>: 1996-09-21 14:59:43 +00:00
perfmon.h Make the long-awaited change from $Id$ to $FreeBSD$ 1997-01-14 07:20:47 +00:00
pmap.h Make the long-awaited change from $Id$ to $FreeBSD$ 1997-01-14 07:20:47 +00:00
proc.h Make the long-awaited change from $Id$ to $FreeBSD$ 1997-01-14 07:20:47 +00:00
profile.h Make the long-awaited change from $Id$ to $FreeBSD$ 1997-01-14 07:20:47 +00:00
psl.h Make the long-awaited change from $Id$ to $FreeBSD$ 1997-01-14 07:20:47 +00:00
ptrace.h Make the long-awaited change from $Id$ to $FreeBSD$ 1997-01-14 07:20:47 +00:00
qcam.h Update to 1.1beta5d 1996-05-04 07:05:55 +00:00
random.h Make the long-awaited change from $Id$ to $FreeBSD$ 1997-01-14 07:20:47 +00:00
reg.h Make the long-awaited change from $Id$ to $FreeBSD$ 1997-01-14 07:20:47 +00:00
reloc.h Make the long-awaited change from $Id$ to $FreeBSD$ 1997-01-14 07:20:47 +00:00
segments.h Make the long-awaited change from $Id$ to $FreeBSD$ 1997-01-14 07:20:47 +00:00
si.h Make the long-awaited change from $Id$ to $FreeBSD$ 1997-01-14 07:20:47 +00:00
signal.h Make the long-awaited change from $Id$ to $FreeBSD$ 1997-01-14 07:20:47 +00:00
soundcard.h Commit AWE32 changes I forgot in my first round. Whoops! 1996-11-16 02:24:23 +00:00
speaker.h Make the long-awaited change from $Id$ to $FreeBSD$ 1997-01-14 07:20:47 +00:00
specialreg.h Make the long-awaited change from $Id$ to $FreeBSD$ 1997-01-14 07:20:47 +00:00
spigot.h Cleaned up all headers that include <sys/ioctl.h> or <sys/ioccom.h>: 1996-09-21 14:59:43 +00:00
spl.h Make the long-awaited change from $Id$ to $FreeBSD$ 1997-01-14 07:20:47 +00:00
stdarg.h Make the long-awaited change from $Id$ to $FreeBSD$ 1997-01-14 07:20:47 +00:00
sysarch.h Make the long-awaited change from $Id$ to $FreeBSD$ 1997-01-14 07:20:47 +00:00
trap.h Make the long-awaited change from $Id$ to $FreeBSD$ 1997-01-14 07:20:47 +00:00
tss.h Make the long-awaited change from $Id$ to $FreeBSD$ 1997-01-14 07:20:47 +00:00
types.h Make the long-awaited change from $Id$ to $FreeBSD$ 1997-01-14 07:20:47 +00:00
ultrasound.h Fix a bunch of spelling errors in the comment fields of 1996-01-30 23:02:38 +00:00
varargs.h I have no idea what this is all about, but it works and Bruce hasn't 1997-02-07 20:22:15 +00:00
vmparam.h Make the long-awaited change from $Id$ to $FreeBSD$ 1997-01-14 07:20:47 +00:00
wtio.h Make the long-awaited change from $Id$ to $FreeBSD$ 1997-01-14 07:20:47 +00:00