← Back to team overview

elementary-dev-community team mailing list archive

Re: On compiler warnings


Am 02.09.2013 00:40, schrieb Sergey "Shnatsel" Davidoff:
> Hey guys,
> I've had a look at what our programs output at build time, and turns
> out the build output consists of a mix of from gcc and valac warnings,
> so it's hard to make out which error comes from which compiler. To
> make matters worse, the build output is dominated by "Building
> some_long_filename -with -a -terribly -long -list -of -parameters"
> lines that successfully obscure any kind of warnings.
> It seems you have to look really hard to see any useful compiler
> warnings. Obviously, this is not how compiler warnings to be presented
> to be useful.
> Is there any way to separate the warnings from the progress messages
> and print it, say, in the end of the build process? I believe this
> would enhance readability immensely.
> I hear that GCC warnings can be safely ignored in Vala programs, but I
> couldn't google up ay prooflinks on that point. Does anybody have any
> insight on this point? FYI, GCC warnings (as opposed to valac ones)
> seem to make up more than half of warnings in many of our projects.
> If they can be safely ignored, perhaps it's a good idea to suppress
> them in CMake. If GCC warnings are actually important, it could help
> if we separated them from valac ones.
> Thoughts?
For what it's worth, Midori has been doing "-w" for a long time now.
Except for the very rare case where one would investigate a valac bug,
the warnings due to generated C are not only not useful but actively
harmful. As you already said, they obfuscate Vala warnings. So you get a
mix of 95% noise and 5% real warnings. Virtually all of the C warnings
caused by Vala are due to type casting - which is totally pointless
because Vala does both compile time and runtime type checking regardless
of what the C compiler does.


Follow ups