-
Notifications
You must be signed in to change notification settings - Fork 117
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
warning: ISO C++ prohibits anonymous structs [-Wpedantic] #59
Comments
Which compiler? For GCC >= 6, there is a directive to disable pedantic errors in that header: pragma GCC diagnostic ignored "-Wpedantic" |
I'm not sure, please see these reports: https://cran.r-project.org/web/checks/check_results_pcadapt.html It is said that for |
Any update on this? |
Wihout access to the compiler and it's warning it's difficult to tell. Can you please try to replace line https://github.com/boostorg/interprocess/blob/develop/include/boost/interprocess/detail/win32_api.hpp#L106 from:
to
and see if this helps? |
Seems it removes the warning. Thanks |
It is not possible because those definitions exactly describe the implementation and ABI provided by Microsoft windows headers so it's better to maintain full compatibility. I guess Mingw provided windows.h is treating those headers as system headers. Patch applied in commit: Many thanks for the report. |
Thanks! Do you think this change will be part of Boost release 1.69? |
Yes, sure. Once develop branch has cycled in several compilers I'll merge into the release branch. |
Merged in master branch: |
@privefl while we wait for an update of the R package {BH}, have you found an interim solution? my CRAN submission is also stuck on this. |
As of today, 152 packages on CRAN reverse-depend on BH. According to you two that would not be possible (modulo not all 152 using IPC but you get the idea). That said, always nice to get changes into upstream. I try to update BH once or twice a year. |
To speak for @privefl based on a guess, it blocks the submission in the sense that our R packages pass CRAN checks up to this warning. Specifically in my case, there seems to be no problem with the package for macOS, but the package does not pass CRAN incoming checks for Windows because of this warning. |
Again, winbuilder does not set (They do use |
That does explain where (Also posting images is in poor taste.) Here is what I ran a few hours ago for package now in incoming/. Not using BH, but using win-builder:
No (And out want to look at |
In any event, we are abusing the poor old Boost Interprocess issue ticket here. Ask you r-package-devel if you have questions, we're there to help. |
You need to "answer all" to the mail your receive from CRAN and explain why you think that this warning is a false positive. I said:
Uwe Ligges was OK with this explanation. And my package is now on CRAN, despite this warning. |
… structs [-Wpedantic]"
I get these warnings from https://github.com/boostorg/interprocess/blob/develop/include/boost/interprocess/detail/win32_api.hpp#L145 (also L153, L178 and L180).
This seems to be similar to this issue.
The text was updated successfully, but these errors were encountered: