This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: FreeBSD 4.0


Loren James Rittle wrote:
> 
> Unfortunately (although extremely minor), that means that until I get
> around to investigating the root issue in fixinc, any C++ code that
> relies on system headers which use _BSD_VA_LIST_ instead of va_list
> (not including stdio.h which is now correctly fixed) will fail with
> errors of this form:
> 
> cannot convert `void *' to `char *' for argument `X' to `foo(...)'
> 
> Richard, is it your position that all system headers must be fixed to
> only reference __gnuc_va_list instead of va_list and/or
> system-specific macros such as _BSD_VA_LIST_ (as was historically used
> by BSD systems)?  If so, then fixinc's rule to mung _BSD_VA_LIST_ into
> __gnuc_va_list must be expanded to operate on 10-15 other standard BSD
> system headers...

May I suggest that stdarg.h/varargs.h be modified to #define
_BSD_VA_LIST_ to __gnuc_va_list, possibly with appropriate ifdefs to
limit it to FreeBSD?  (Is this needed by Net/OpenBSD too?)  This is
simpler and less fragile than adding stuff to fixinc.

For complicated reasons related to similar interactions with glibc's
headers, I'd personally like to see the typedef name be __va_list, and
__gnuc_va_list a #define as well.

zw


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]