FYI, reported here: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93643
On Sun, 9 Feb 2020 at 12:14, Iñaki Ucar <iu...@fedoraproject.org> wrote: > > BTW, I've noticed that, if you remove the extern "C" declaration and > compile your example as C code with gcc 9.2.1, there's a warning: > > broken.c:16:16: warning: ‘f’ is static but declared in inline function > ‘f2’ which is not static > 16 | static void (*f)(); > | ^ > broken.c:9:16: warning: ‘f’ is static but declared in inline function > ‘f1’ which is not static > 9 | static void (*f)(); > | ^ > > and then the linker fails with undefined references to f1 and f2. > Declaring f1 and f2 as static inline solves the issue in C and also in > C++ for gcc 10. > > Maybe it would be better to declare those RcppEigen stubs as static inline? > > Iñaki > > On Sun, 9 Feb 2020 at 11:47, Iñaki Ucar <iu...@fedoraproject.org> wrote: > > > > On Sun, 9 Feb 2020 at 03:36, Kevin Ushey <kevinus...@gmail.com> wrote: > > > > > > Here's an example program that fails to compile with gcc-10 for me: > > > > > > https://gist.github.com/kevinushey/cfa848be2d39ddd110f893d9b6c5ac9c > > > > > > So I think we can conclude this is a gcc-10 bug. It also fails with > > > the contracts branch of gcc on godbolt (although with a different > > > error): > > > > > > https://godbolt.org/z/dowsE5 > > > > > > But gcc trunk seems okay. > > > > Thanks for looking into this. Now I'm more confident bringing this upstream. > > > > Iñaki > > > > -- > Iñaki Úcar -- Iñaki Úcar _______________________________________________ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel