Hi, Greg Troxel <[EMAIL PROTECTED]> writes:
> The `inline.h' machinery is confusing for some compilers (e.g., > DEC/Compaq/HP CC). The issue is the following: when an inline keyword > is supported and a non-GCC compiler is used, the header looks like this: > > extern SCM scm_cell (...); > > static inline > scm_cell (...) > { ... } > > Perhaps I'm confused too, but the compiler's complaint seems correct. Yes, indeed---did I seem to imply that the compiler was wrong? :-) > The patch seems ok, but I also wonder if the problem couldn't be solved > leaving the declarations by defining macros that expand properly to > extern/not and using them as > > > > INLINE_SCOPE_DECLARATION_KEYWORD SCM scm_cell (...); > > INLINE_SCOPE_DEFINITION_KEYWORD inline > scm_cell (...) > { ... } That seems quite complex to me (i.e., does not really improve readability/maintainability), for little in return since its use is limited to `inline.h' anyway. Currently, we assume that only GCC knows how to handle "extern inline". I'm not sure this assumption is true in practice (doesn't C99 specify it?), but it's probably "good enough". Thanks, Ludovic.