Adar Dembo has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/15245 )

Change subject: faststring-test: squelch unknown pragmas warning when building 
with gcc
......................................................................


Patch Set 2:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/15245/2//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/15245/2//COMMIT_MSG@20
PS2, Line 20: additional pragmas
> Just curious: would using
The problem is multi-fold:
1. GCC emits a warning on any "#pragma clang". Clang, on the other hand, honors 
"#pragma GCC".
2. GCC doesn't support -Wself-move and so it emits a warning on something like 
#pragma GCC diagnostic ignored "-Wself-move" too.
3. Due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53431, the g++ 
preprocessor doesn't process pragmas during preprocessing. Which means that you 
can't do something like #pragma GCC diagnostic ignored "-Wunknown-pragmas" 
before moving on to #pragma GCC diagnostic ignored "-Wself-move".

So AFAICT, there's no combination of pragmas that can get the job done here. 
Not #pragma clang, not #pragma GCC, and not some combination of the two. If you 
can figure it out I'm happy to be shown that I'm wrong though.



--
To view, visit http://gerrit.cloudera.org:8080/15245
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ifa3c1ad13999b64ecfffcab4eb058c2da0c664a7
Gerrit-Change-Number: 15245
Gerrit-PatchSet: 2
Gerrit-Owner: Adar Dembo <[email protected]>
Gerrit-Reviewer: Adar Dembo <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Todd Lipcon <[email protected]>
Gerrit-Comment-Date: Wed, 19 Feb 2020 19:05:51 +0000
Gerrit-HasComments: Yes

Reply via email to