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

Warning (-Wunknown-pragmas) with gcc 9.2 in Common.h #1449

Open
phcerdan opened this issue Jan 9, 2020 · 5 comments
Open

Warning (-Wunknown-pragmas) with gcc 9.2 in Common.h #1449

phcerdan opened this issue Jan 9, 2020 · 5 comments
Assignees
Labels

Comments

@phcerdan
Copy link
Member

phcerdan commented Jan 9, 2020

src/DGtal/base/Common.h:48: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas]
   48 | #pragma clang diagnostic push
      |
src/DGtal/base/Common.h:49: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas]
   49 | #pragma clang diagnostic ignored "-Wdeprecated-declarations"
      |
In file included from src/tests/topology/testSplitFunctions.cpp:30:
src/DGtal/base/Common.h:53: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas]
   53 | #pragma clang diagnostic pop
      |

I tried to just push, below the current GCC diagnostic ignored

#pragma GCC diagnostic ignored "-Wunknown-pragmas"

but doesn't seem to work.

@rolanddenis rolanddenis self-assigned this May 18, 2020
@rolanddenis
Copy link
Member

I get these warnings only if I enable WITH_QGLVIEWER (and also for older versions of GCC, 7 & 8)... same for you?

@phcerdan
Copy link
Member Author

phcerdan commented May 18, 2020

Yes! I have WITH_QGLVIEWER enabled. I should re-check if I get these in gcc10.

@rolanddenis
Copy link
Member

I should have checked the code before: these pragma are parsed only if WITH_QGLVIEWER is set: https://github.com/DGtal-team/DGtal/blob/master/src/DGtal/base/Common.h#L45 😅

@rolanddenis
Copy link
Member

Clang is supposed to support the #pragma GCC but I don't know if XCode behaves differently... @dcoeurjo can you check on your side after removing the #pragma clang?

@rolanddenis
Copy link
Member

Yes! I have WITH_QGLVIEWER enabled. I should re-check if I get these in gcc10.

Same warnings in GCC 10.1 (BTW thanks for the information that v10 was released 😉 )

@dcoeurjo dcoeurjo added the Build label Apr 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants