Re: Gcc warnings parity with Visual Studio warnings
Jim Tilander <jim <at> tilander.org>
2007-10-16 00:36:04 GMT
Ralph,
Is there a reason why you don't enable warning level 4 on MSVC? That
coupled with disabling some of the warnings on gcc would probably get
you somewhere towards where you want to be in terms of overlapping
warnings. Now, I wouldn't recommend doing that though, I'd just enable
all the warnings I could find and leave them on both compilers. There
are very few select warnings that I would disable, but other than that
I think that every warning the compiler bothers to issue, you should
inspect and ponder for a while. The more the better.
Another problem seems to be the issue why not everyone on your team
feels that they can compile on all the platforms before checking in?
It sounds to me that they should start compiling at least on the
compiler that issues the most warnings first and maybe skip in a pinch
the compiler that has the weakest warnings (usually MSVC).
I've worked on a small team where we had the policy that if it ran on
one platform you were ok to check in, but anyone that found any
warnings / breakages had to fix them. It worked great because we were
a small team and everybody took responsibility but if any of those
lack, then you have a problem. Most likely you will wind up with one
platform (high chance of that being the non win32 one) being
constantly broken by code that simply doesn't work / spams warnings
all over the place. At that point you got to ask yourself if this is
acceptable behavior for a group of people to check in constantly
broken code (code that issues warnings is in my eyes broken). Maybe it
is. You could assign one person to monitor the situation and fix the
warnings as they come in. However that person will probably go nuts
after a while if you have a decent sized team...
As for fixing the build once it's broken, it should be fairly simple
with most warnings. If there simply are too many, hey -- source
control is there to be used. Reverting a changelist in perforce can be
done in a matter of seconds (you can even use a script to do it
http://www.tilander.org/aurora/articles/000028.html). Then people can
continue working and you can fix the warnings without stress.
/j
p.s.
(as it happened I just had to rant a little about warnings yesterday
http://www.tilander.org/aurora/articles/000036.html).
On 10/15/07, Ralph <spam0rz <at> gmail.com> wrote:
>
>
> Ideally I'd love all the developers to not check in any code without
> warnings, but not everyone is compiling each platform every check in. So
> their compile is warning/error free for them, but the other platform
> complains about something. It would be nice to get most of the warnings
> that come from GCC -Wall and have them represented in VS (currently with
> Warning level 3, but adding warnings to get in parity with GCC).
>
> It is useful to get a variety of warnings, it would be nice if there was
> more overlap in this warnings for each platform. I don't want to remove any
> warnings, just get some of the same on each platform/config. The purpose of
> doing this would be to reduce the number of build breaks and the time it
> takes for the fix for breaking the build to come in.
>
> Ralph
>
>
> Bryan Wagstaff wrote:
>
>
> Does anyone know of a resource or the list of Visual Studios warnings
> that encompass the gcc -Wall warnings?
>
> They do not directly map to each other. With the exception of the
> blatant language violations, most warnings are different between
> compilers.
>
> Although there is a lot of overlap, there are many things caught by
> one compiler that are undiagnosed with the other.
>
> We have found that this is useful behavior. We use three different
> compilers, one per platform. All the compilers are turned on to the
> highest warning level with warnings treated as errors, and the code
> must compile and run on all platforms before being submitted to the
> main branch.
>
> It is often the case among junior developers that they will write code
> that compiles cleanly on one platform (usually VC++) that fails to
> compile on another platform. Almost always this is due to a bug in
> their code. Of course, tenured programmers like me NEVER have that
> problem.
>
>
>
>
> I've got a multiplatform project and I'd like the warnings to be the
> same (same type of warning) for each build configuration.
>
> I'm curious why you think that this mapping would be useful to your
> project. Hopefully your developers would fix any warnings before
> submitting it, so I can't imagine it being too useful for automated
> build scripts or similar tools. When a developer breaks the build it
> is easy to track it back to the checkin that broke it.
>
> What do you hope to gain by getting all your warnings to be similar
> among each configuration?
> _______________________________________________
> Sweng-Gamedev mailing list
> Sweng-Gamedev <at> lists.midnightryder.com
> http://lists.midnightryder.com/listinfo.cgi/sweng-gamedev-midnightryder.com
>
>
>
> _______________________________________________
> Sweng-Gamedev mailing list
> Sweng-Gamedev <at> lists.midnightryder.com
> http://lists.midnightryder.com/listinfo.cgi/sweng-gamedev-midnightryder.com
>
>
--
--
Beware of architect astronauts.
_______________________________________________
Sweng-Gamedev mailing list
Sweng-Gamedev <at> lists.midnightryder.com
http://lists.midnightryder.com/listinfo.cgi/sweng-gamedev-midnightryder.com