[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: must use gcc builtin?
On Wed, Feb 22, 2012 at 12:09:25AM -0500, James K. Lowden wrote:
> On Wed, 22 Feb 2012 05:43:13 +0100
> Joerg Sonnenberger <joerg%britannica.bec.de@localhost> wrote:
> > > I can't #undef __GNUC__. Do we really want to require the use of
> > > builtins? I'd like a knob to compile idiomatic C, especially
> > > *good* idiomatic C.
> > Yes, we really want to require the builtins for stdarg.h. Depending on
> > the architecture, it is not even possible to write pure C code to do
> > stdarg.h handling.
> But for most architectures it *is* possible, and to *require* builtins
> is to prevent reasonable code from compiling.
I don't consider code that relies on undefined behavior in the way you
describe to be "reasonable". You say that assuming the data type is a
pointer is "not prohibited" by the standard -- but that still leaves
you in the land of nasal demons, since you are making assumptions about
the data type that the standard does not support.
I do not think we should change anything in NetBSD to make such code work
unless, perhaps, a specific case of it is so common as to constitute a
de-facto standard -- which AFAICT the case you describe is not.
Main Index |
Thread Index |