Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2002:
[Freeciv-Dev] Re: compile errors on bitvector code with Sun cc (PR#2046)
Home

[Freeciv-Dev] Re: compile errors on bitvector code with Sun cc (PR#2046)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Cc: bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: compile errors on bitvector code with Sun cc (PR#2046)
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Fri, 27 Sep 2002 10:05:31 -0700 (PDT)

On Fri, 27 Sep 2002, Gregory Berkolaiko wrote:
> > The aitools.h problem is much bigger, and probably comes up in many
> > places in the code.Does anyone know how this can be avoided?  Is there
> > a more "proper" way to do variable-argument macros, or is that just
> > impossible in Sun CC?
>
> I don't know anything about it but I notice that freelog (common/log.h) is
> implemented as a function rather than macro for non-gnu compilers, with
> the comment:
>
> /* For GCC we use a variadic macro; for others we take
>  the performance hit of a function to get variadic args:
>  */

Eeek. We can't have doubles for each of the aitools.h macros, and there
will probably be more of them.

The best alternative I can see is to make them functions, but leave them
in the header file for inlining. We could even slap an __inline__ on them
to encourage it...

Yours
Per

"I don't see why people are so upset about cloning sheep. American
television networks have been doing that to their audiences for years."
-- Jello Biafra




[Prev in Thread] Current Thread [Next in Thread]