Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Jun 1997 03:40:01 -0700 (PDT)
From:      Bruce Evans <bde@zeta.org.au>
To:        freebsd-bugs
Subject:   Re: bin/3884: stdarg.h fails for data types < 4 bytes
Message-ID:  <199706171040.DAA07953@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/3884; it has been noted by GNATS.

From: Bruce Evans <bde@zeta.org.au>
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 <stdarg.h>, 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199706171040.DAA07953>