Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Jan 1998 14:06:21 -0800 (PST)
From:      Sean Eric Fagan <sef@kithrup.com>
To:        current@freebsd.org
Subject:   Re: Nasty GCC bug?
Message-ID:  <199801202206.OAA18817@kithrup.com>

next in thread | raw e-mail | index | archive | help
>Is is an artifact of the calling convention, which is implementation
>defined.

No, it is not.

Variardic functions ARE REQUIRED TO USE OLD-STYLE PROMOTION RULES.

REQUIRED.

As in MANDAATORY.

Further, printf then treats the argument as int; this is also required by the
standard.

>It has *NOT* "always been the case"; on systems which do not use an
>integer stack based calling convention, the value can be treated as
>its type by the varradic function, instead of being treated as an int.
>It is the promotion caused by the calling convention that is the
>source of the breakage.

It *has* always been the case; not doing it this way is a bug.  yes, there
have been buggy implementations, and some of those are even superior ot the
correct, required implementation.

If I still had my copy of ANSI C, I could tell you the exact paragraph numbers
that require this behaviour.  As it is, I quoted man pages at you, and other
peopl ehave quoted man pages at you.

Terry, you are *WRONG*.  Admit it.




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