Clang RecursiveASTVisitor warning message? - c++

When running my RecursiveASTVisitor program on Objective C codes, I keep getting this warning warning: unknown warning option '-Wno-receiver-is-weak'; did you mean '-Wno-receiver-expr'? [-Wunknown-warning-option]
But I didn't compile it with warnings enabled or have any warning options within my code.
Where does the error warning come from and how can I disable it?

Related

How to error rather than warning on specific rule

I want the build to error out on trailing_whitespace. I have added trailing_whitespace: error to my .swiftlint.yml but it's still just showing up as a warning.
I've seen How to force error on SwiftLint instead of warnings? but that's about treating all warnings as errors, I want just selectively treat some rules as errors.
This works in your .swiftlint.yml file:
trailing_whitespace:
severity: error

Not getting c4267 warning for few lines in code

I had a task of removing all warnings in one of the project.
At one place in code I had following line.
dims[0] = children.size();
Where dims is 'int' array and children is a 'vector', so size_t is assigned to int. I am compiling this code on VS2015.
Ideally the above assignment should generate a warning
"C4267: '=': conversion from 'size_t' to 'int', possible loss of data"
But I don't get any such warning. So there are zero warnings in the code.
Now I convert warning 4267 into an error using '/we4267' and then start getting error for above lines.
I am confuse why compile didn't showed any warning in first place.
Thanking you all for your help.
I found that when /WX compiler option is added then some warnings, in my case C4267, are suppressed. Either adding compiler option /WX /Wall or removing them all together shows error/warning C4267. In my case I was getting error in other modules as there was no warning related compiler option add but the module where I didn't got C4267 warning, had compiler option /WX.
Its just that there is no documentation regarding this(or may be I was not able to find one).

cc1plus: some warnings being treated as errors

In system:
Fedora 21
Ruby 2.1.7
GCC 4.9.2
I follow the instructions for installing simstring but afer
$ruby extconf.rb
when trying to make and make install, I got an error:
cc1plus: some warnings being treated as errors
Makefile:217: recipe for target 'export_wrap.o' failed
make: *** [export_wrap.o] Error 1
And the entire log of this error is bellow
Error Log
I searched about this error but all of replies are about how to disable Werrors and configure with ignoring werrors.
Is there any solution?I think something not mentioned but i don't know what..
I searched about this error
That's not an error. It's a notification. It notifies that some warnings have been treated as errors.
I searched about this error but all of replies are about how to disable Werrors and configure with ignoring werrors. Is there any solution?
You answered your own question. If the source code of the program generates warnings, and if the compiler is asked to treat warnings as errors, then the compiler will refuse to compile the program. Complete list of possible solutions are:
Fix the source code to not generate warnings. This is a very good idea.
Stop asking the compiler to treat warnings as errors (this is the solution that you already found). You should still fix the code to not generate a warning.
Ask the compiler to ignore the warnings entirely. This is usually a bad idea unless you understand the warning and know what you're doing.

suppress gfortran warning message

Does anyone know if there is an option to suppress the following warning message
from gfortran:
Warning: Extension: Conversion from HOLLERITH to INTEGER(4) at (1)
(Without changing the code, that is).
I have already tried the options: -Wno-conversion-extra -Wno-conversion
I'm using gfortran 4.9.1 by the way.
Probably you can try this way:
-std=legacy
This may suppress the warning information as you mentioned since Hollerith constant is the legacy feature before FORTRAN77. However, downside of using this option is that all the possible legacy collision may not be shown. I have tested this option on gfortran 6.2.0.

Suppressing Compiler Warning C++

I'm getting a compile-time error. It complains that I'm initializing a variable, but not referencing it. What's happening is that I initialize it then make a debug print statement that only get's compiled in for a debug build but not a release build. The error in question is warning c4189 (it's treated as an error and won't compile).
Is it possible to suppress this warning? How about warnings in general?
Don't suppress the warning, fix it! Wrap the declaration and initialization of the variable so it only exists in a debug build too.