Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xtensor pragma use #11

Closed
DavisVaughan opened this issue Feb 26, 2019 · 2 comments
Closed

xtensor pragma use #11

DavisVaughan opened this issue Feb 26, 2019 · 2 comments

Comments

@DavisVaughan
Copy link
Contributor

I've noticed this note in the past. Did CRAN bless this as being alright? Not sure if there is anything you can do about it anyways since I'm guessing you need it in core xtensor, but just wanted to ask.

Version: 0.9.0-0 
Check: pragmas in C/C++ headers and code 
Result: NOTE 
    File which contains pragma(s) suppressing diagnostics:
     ‘inst/include/xtensor/xstorage.hpp’ 
@SylvainCorlay
Copy link
Member

SylvainCorlay commented Feb 26, 2019

Yes, we have generally made the following answer to CRAN, and every time, they accepted the package an dismissed the note:

The submission to CRAN seems to be rejected automatically over the following NOTE:

* checking pragmas in C/C++ headers and code ... NOTE File which contains pragma(s) suppressing diagnostics:
  ‘inst/include/xtensor/xstorage.hpp’

The xstorage.hpp file in xtensor adds a pragma and removes it in the end of the file, to prevent an incorrect warning to be triggered by GCC8:

// The C++ standard defines tuple_size as a class, however
// G++ 8 C++ library does define it as a struct hence we get
// clang warnings here
#if defined(__clang__)
    #pragma clang diagnostic push
    #pragma clang diagnostic ignored "-Wmismatched-tags"
#endif
{
   [...]
}
#if defined(__clang__)
    #pragma clang diagnostic pop
#endif

In our opinion, this is the correct way to deal with this compiler bug and we actually pop the diagnostic pragma that we pushed after the code triggering it. Hence I don't think that this NOTE should be a blocker for the latest release of xtensor to be accepted on CRAN.

@DavisVaughan
Copy link
Contributor Author

Sounds good! Just wanted to make sure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants