[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Inline machinery
From: |
Greg Troxel |
Subject: |
Re: Inline machinery |
Date: |
Fri, 22 Feb 2008 07:35:08 -0500 |
User-agent: |
Gnus/5.110007 (No Gnus v0.7) Emacs/22.1 (berkeley-unix) |
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.
This points out that some time I'm bored I should try to build with pcc,
which is derived from an old C compiler, and is now included in NetBSD.
Using a second compiler has apparently resulted in many failures to
conform to C99 being fixed.
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 (...)
{ ... }
So we could have either
static/static
or
extern/[emtpy]
- Inline machinery, Ludovic Courtès, 2008/02/22
- Re: Inline machinery,
Greg Troxel <=