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.

Best,
Kevin


On Sat, Feb 8, 2020 at 5:20 PM Dirk Eddelbuettel <e...@debian.org> wrote:
>
>
> On 8 February 2020 at 16:59, Kevin Ushey wrote:
> | It seems like a bug in gcc 10 to me. IIUC, static local variables in
> | inline functions should still have internal linkage, and so name
> | collisions like this should not occur.
> |
> | I can work around this by making sure that 'fun' is given different
> | names in the RcppEigen stubs; e.g. fun1 and fun2 and so on. The fact
> | that this actually works makes me think it might be a gcc bug.
>
> Thanks for looking, and checking. My (uneducated) guess and hunch went the
> same way.
>
> Dirk
>
> --
> http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org
_______________________________________________
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

Reply via email to