Re: vararg LOG() macro in 1.4.7
- From: Nikolai Weibull <mailing-lists epiphany rawuncut elitemail org>
- To: epiphany-list gnome org
- Subject: Re: vararg LOG() macro in 1.4.7
- Date: Fri, 28 Jan 2005 22:29:00 +0100
* Christian Persch (Jan 28, 2005 19:10):
> > Epiphany-1.4.7 makes use of a vararg LOG() macro. This is not C89
> > compliant. I'm trying to build 1.4.7 on IRIX. While the SGI c99
> > compiler can grok the LOG() macro, the SGI C++ compiler cannot. So,
> > should I submit a patch that creates LOG#() macros where # >= 2 for
> > the number of macros in the LOG call and substitute accordingly in
> > the source files or should I create a static inline function in
> > lib/ephy-debug.h: static inline LOG(char *format, ...) {} and then
> > add semicolons to the end of all LOG() calls?
> Is there no other way? Can we redefine LOG() as empty in this case
> perhaps? If that's not possible, I think I prefer the static inline
> function in ephy-debug.h. Is there any way as to not require to add ;
> to all LOG calls?
One can of course use the horribly ugly, unintuitive, and error-prone
LOG((...));
but that's soooo 1989...
Why not make it a function as you say. Doesn't gcc optimize away
functions that aren't used (especially static inlined ones)?
Btw, does gcc optimize away stuff like
if (0) {
...
}
?,
nikolai
--
::: name: Nikolai Weibull :: aliases: pcp / lone-star / aka :::
::: born: Chicago, IL USA :: loc atm: Gothenburg, Sweden :::
::: page: www.pcppopper.org :: fun atm: gf,lps,ruby,lisp,war3 :::
main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]