Page 1 of 1

Compil warning & compilers

Posted: Sat Sep 21, 2013 1:01 pm
by vincele
Hello,

I was curious about VS's compilability with llvm/clang and found it fairly good,
and the end result is working properly too. Good.

But the build is very noisy with piles of warnings all over the place, so that led
me to start "fixing" some of them, which resulted in a quilt series of 44 patches
that I posted in https://sourceforge.net/p/vegastrike/patches/66/ (some of those
may be overlapping with Nido Media's set in patches/65)

I did them finegrained to the extreme, so that they can be cherry picked independently
and the nonobvious ones may be easily postponed / discussed.

The end result is compile and runtime tested with debian's gcc-4.7.3-4, gcc-4.8.1-2
and clang 3.4-1~exp1 (nightly trunk). The gcc-4.8 bug discussed in
http://forums.vega-strike.org/viewtopic.php?f=5&t=18612
is fixed in newer versions, I stumbled upon it and verified that it is really fixed for VS.

Please advise if such work is useful or not.

I'm still contemplating the patches needed to fix the compil errors that I got with clang
because I'm not sure they're proper fixes or just bandaids...

Re: Compil warning & compilers

Posted: Sat Sep 21, 2013 1:03 pm
by vincele
If someone want a single patch for the full series, for example to test it on MS compilers, just ask...

Re: Compil warning & compilers

Posted: Sat Sep 21, 2013 10:24 pm
by pheonixstorm
I think some of the patches we may need a reference for on what warning(s) it fixes. Other than that these have been on the todo list for a bit so it will be nice to get some of the quicker fixes out and take a closer look at any of the more dangerous warnings (if any)

Re: Compil warning & compilers

Posted: Sat Sep 21, 2013 11:36 pm
by vincele
OK, should I bother writing real changelogs or a single-line explanation will be sufficient ?

Re: Compil warning & compilers

Posted: Sun Sep 22, 2013 3:38 am
by pheonixstorm
single line would be fine. So just whatever warning code and maybe the actual warning message so it can be looked up. I don't see any need for anything more. May want to see if klauss chimes in on this just to be safe though.

Re: Compil warning & compilers

Posted: Sun Sep 22, 2013 5:36 pm
by vincele
OK I'm currently finishing the individual changelogs for each patch, I hope they will be useful...

Re: Compil warning & compilers

Posted: Mon Sep 23, 2013 4:10 am
by pheonixstorm
Everything is useful, even if we don't get to it for awhile or just can't use it.

Re: Compil warning & compilers

Posted: Mon Sep 23, 2013 10:09 am
by vincele
Yes but that's a huge amount of work, to get proper finegrained individual changelogs, I estimate the time to do that work to be 3-4 times the time to fix the code itself, and I hope that work not to be lost. I'm not in a hurry, and probably some of the patches will be wrong...

There's a lot of re-compiling done to get the warnings, ccache was of use, but its usefulness stops when a header file is touched that's included everywhere (often indirectly). I may want to give a try at fixing this next. Would it be useful work ? Splitting includes, not including inside .h, etc...

My main worry about such work is that I cannot test MS windows compil, as I don't have access to a MSdev box...

Re: Compil warning & compilers

Posted: Tue Sep 24, 2013 6:33 am
by pheonixstorm
well we did have a ticket for all the windows compile errors.. Not sure what happened to it, may have been lost when sourceforge moved everyone over to its new system. If you want a list of all the VC10 warnings I can recompile with all warnings on. It was a big list though. I will try and go over the patch list this week for what you already have on the tracker. I guess for now just post whatever you think are the highest priority warnings. Not sure how many of the warnings will match up between win32 and linux.

As for header files... They can be really touchy. I once tried to add inclusion guards to a file (forget which) and then VS refused to compile. May want to start with some of the smaller ones before getting into the messier elements of the code ;)

Re: Compil warning & compilers

Posted: Tue Oct 01, 2013 5:07 am
by klauss
pheonixstorm wrote:single line would be fine. So just whatever warning code and maybe the actual warning message so it can be looked up. I don't see any need for anything more. May want to see if klauss chimes in on this just to be safe though.
I have a huuuuge backlog of things to check. I'll get around to it eventually, but other devs are welcome to review the patches in the meanwhile ;)

Re: Compil warning & compilers

Posted: Wed Oct 02, 2013 2:13 am
by pheonixstorm
I am hoping to get to it.. Finally finished rebuilding an older comp for my parents so that frees up some time. Or will once I get all the bookmarks and thunderbird data copied over.

Re: Compil warning & compilers

Posted: Wed Oct 09, 2013 10:12 pm
by vincele
I have the series properly changelogged (hopefuly...) I'll update the bug report whortly