[Rd] -std=c99 and inline semantics

Prof Brian Ripley ripley at stats.ox.ac.uk
Tue Mar 20 09:36:58 CET 2007


As even 4.2.0 is not released yet, we will make changes at an appropriate 
time.  The GNU and C99 semantics for 'inline' are known to be 
incompatible.

>From src/include/Rinlinedfuns.h:

/* this header is always to be included from others.
    It is only called if COMPILING_R is defined (in util.c) or
    from GNU C systems.

    There are different conventions for inlining across compilation units.
    We pro tem only use the GCC one.  See
    http://www.greenend.org.uk/rjk/2003/03/inline.html
*/

and note the 'pro tem'.

On Mon, 19 Mar 2007, Marcus G. Daniels wrote:

> Hi,
>
> I noticed that with the GCC trunk (4.3.0), the semantics of "extern
> inline" have reversed.
> The net result is that R will build without the usual-stdc=gnu99 but it
> won't with it.
> Many multiple definitions result otherwise.
>
> Marcus
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-devel mailing list