Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RcppEigen package "#pragma clang diagnostic pop" warnings

Tags:

r

rcpp

I am having some trouble when trying to use the RcppEigenpackage. I used the example posted here. The function worked, but R generated a series of similar warnings (example as below).

In file included from example.cpp:1:
In file included from /Users/nguy2338/Library/R/3.4/library/RcppEigen/include/RcppEigen.h:25:
In file included from /Users/nguy2338/Library/R/3.4/library/RcppEigen/include/RcppEigenForward.h:30:
In file included from /Users/nguy2338/Library/R/3.4/library/RcppEigen/include/Eigen/Dense:1:
In file included from /Users/nguy2338/Library/R/3.4/library/RcppEigen/include/Eigen/Core:531:
/Users/nguy2338/Library/R/3.4/library/RcppEigen/include/Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]
#pragma clang diagnostic pop

So, what do these warnings mean and how should I deal with these warnings?

like image 950
Hoang Nguyen Avatar asked Mar 28 '18 03:03

Hoang Nguyen


1 Answers

The solution is

#define EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS
#include <Eigen/Eigen>
like image 142
THK Avatar answered Sep 18 '22 15:09

THK