Which of these should I use to ignore a warning?
#pragma clang diagnostic ignored "-W<warning>"
#pragma GCC diagnostic ignored "-W<warning>"
Both seems to work for me, however which one is the correct to use?
Should I always use the one matching the compiler I'm using?
“You should stop eating fast food.” “You should go for walks more often.” “We should go to the park tomorrow.” “He should go to the pharmacy first thing in the morning.”
Used to refers to something familiar or routine, as in "I'm used to getting up early for work," or to say that something repeatedly happened in the past like "we used to go out more." Use to typically occurs with did; "did you use to work there?" or "it didn't use to be like that," describing something in the past that ...
Should is used to say that something is the proper or best thing to do, or to say that someone ought to do something or must do something. Adam could visit us on Monday. This tells us that it is possible Adam will visit on Monday, maybe he can visit us, but maybe he has other options, too.
Should have is often expressed as the contraction should've, especially in speech. Should've sounds perilously like should of, however should of is not correct and should never be used. Contractions have been around as long as the English language, many examples exist in Old English.
Generally, you should prefer #pragma GCC
in cases where the pragma is GCC-specific, or is equally applicable to GCC, Clang, and other compilers which try to be GCC-compatible (such as ICC). Use #pragma clang
in cases where the pragma is in some way Clang-specific (such as a diagnostic option which doesn't exist in GCC).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With