Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/include



Stephen Degler <skd%netbsd.org@localhost> writes:
> Module Name:  src
> Committed By: skd
> Date:         Mon Aug 21 14:09:44 UTC 2006
>
> Modified Files:
>       src/include: stddef.h
>
> Log Message:
> Use gcc's builtin function.  This permits c++ compiliation of const
> expressions using offsetof.  Boost-python relies on this, for example.

I'm not sure this is 100% correct. I think it would be better to do an
#ifdef so that __builtin_offsetof() is used only if __GNUC__, and
otherwise use the old one. Otherwise we can break compilation with
other compilers. (It might be reasonable to make that contingent on
gcc4...)

Perry



Home | Main Index | Thread Index | Old Index