[Top][All Lists]

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

Re: [PATCH] Inlining `scm_is_pair ()'

From: Kevin Ryde
Subject: Re: [PATCH] Inlining `scm_is_pair ()'
Date: Wed, 25 Jan 2006 07:12:15 +1100
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux)

address@hidden (Ludovic Courtès) writes:
> The following patch makes `scm_is_pair ()' an inline --- the macro was
> indeed a bad idea because there are places (e.g., async.c:208) where its
> argument is an assignment.

Which is probably not really in line with gnu coding standards
( end of "Syntactic Conventions" node).  But I guess any
application might do it.

> I'm not sure that's the only reason, but I'm now unable to compile Guile
> with `-O0': when doing so, I get a "stack overflow" error when trying to
> run the REPL.  Perhaps we should also declare the function with
> `__attribute__ ((always_inline))'?

That was ceval/deval() local variables on gcc 4 last time I hit that.
-O1 may be better, or just on eval.c at least.

> +static SCM_C_INLINE int

I suspect extern inline is what you want, static inline might end up
with a copy of the code in every file, under -O0 at least.  But extern
inline is even more of a gcc-ism, if you're worried about the
commercial compilers.

reply via email to

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