From owner-freebsd-bugs Tue Jun 17 03:40:03 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id DAA07965 for bugs-outgoing; Tue, 17 Jun 1997 03:40:03 -0700 (PDT) Received: (from gnats@localhost) by hub.freebsd.org (8.8.5/8.8.5) id DAA07953; Tue, 17 Jun 1997 03:40:01 -0700 (PDT) Date: Tue, 17 Jun 1997 03:40:01 -0700 (PDT) Message-Id: <199706171040.DAA07953@hub.freebsd.org> To: freebsd-bugs Cc: From: Bruce Evans Subject: Re: bin/3884: stdarg.h fails for data types < 4 bytes Reply-To: Bruce Evans Sender: owner-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk The following reply was made to PR bin/3884; it has been noted by GNATS. From: Bruce Evans To: arnej@mail.math.ntnu.no, arnej@math.ntnu.no, bde@zeta.org.au, FreeBSD-gnats-submit@FreeBSD.ORG Cc: Subject: Re: bin/3884: stdarg.h fails for data types < 4 bytes Date: Tue, 17 Jun 1997 20:20:32 +1000 >> >>How-To-Repeat: >> > >> > Inspect , or compile and run the following test >> > program, gotten from c-torture. >> >> This program does not conform to standard C. > >If it used short, I would agree with you. However, it uses a struct, >and structs doesn't promote at all. Therefore, the program is >conforming (maybe even strictly conforming) Ansi C and must work. You are right. I should have read your example more carefully. Your patch can be improved by fixing the KERNEL case too and renaming __va_promote - there is no way to determine the promoted sizes without a builtin, and the args may have additional padding anyway, so __va_promote is a confusing name. The corresponding macro is named __va_rounded_size in gcc/ginclude/stdarg.h and __va_size in NetBSD. Bruce