trueaxis.com Forum Index trueaxis.com
True Axis Physics SDK Forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

compiler warnings

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    trueaxis.com Forum Index -> Bugs
View previous topic :: View next topic  
Author Message
kas



Joined: 23 Sep 2006
Posts: 6

PostPosted: Sat Sep 23, 2006 11:08 am    Post subject: compiler warnings Reply with quote

i've tried compiling obfuscated sources and found that there are more than 4000 warnings with /W4. It seems that there are more of them but my compiler (vs2005) eventually crashed with ICE. As far as i understand those open sources are kinda in sync with actual commercial sources and this means that commercial sources compiles with warnings too. It would be very nice if you could take your time and with future releases fix those warnings. thanks in advance
Back to top
View user's profile Send private message
luke
Site Admin


Joined: 15 Oct 2004
Posts: 621

PostPosted: Mon Sep 25, 2006 10:31 am    Post subject: Reply with quote

I beleive that there are no warnigs compiling with gcc and msvc with the default warning level set.

I beleive that with /w4, most of the warnings that are generated are give for intentional behavior. Changing the code to remove the warnings is not desirable or even practical in this case.

I sugest that if you wish to keep /w4, then wrap the TrueAxis source with #praga warning disabling code.
Back to top
View user's profile Send private message Send e-mail
Mario



Joined: 01 Jul 2006
Posts: 20

PostPosted: Mon Sep 25, 2006 12:35 pm    Post subject: Re: compiler warnings Reply with quote

kas wrote:
It would be very nice if you could take your time and (...)

Uh, huh... I would never though that any newbie would ever accuse TA for being poorly written or even give own "brilliant" suggestions.
Damn children... they always think they would do something better.
Once again Luke remained calm and patient... Wink
Back to top
View user's profile Send private message
zeux



Joined: 25 Sep 2006
Posts: 2

PostPosted: Mon Sep 25, 2006 1:35 pm    Post subject: Reply with quote

Ok, let's see.

zcta004.cpp

Lines 10419-10435:

TA_ASSERT
(
llO\
lOlll\
Ol
.
llOOOl\
OOlO\

=
&
lO\
llOlOOl\
O\

)
;

Not exactly what you've meant, eh?

There is more, though other warnings deal with logic of the code, which is... quite hard to grasp from the obfuscated source. But I am sure that you will find something interesting if you carefully examine /W4 compiler output (if you turn C4127 before, which is generated for every ASSERT).

Also there are lots of lines which seem strange to me (like, if (...) int ... = 0Wink, sometimes there is a lot of code and a simple return; in front of it.


Last edited by zeux on Mon Sep 25, 2006 1:40 pm; edited 1 time in total
Back to top
View user's profile Send private message
zeux



Joined: 25 Sep 2006
Posts: 2

PostPosted: Mon Sep 25, 2006 1:39 pm    Post subject: Reply with quote

Though, I must admit, that the original post's author was slightly incorrect - there is indeed a lot of warning in W4 (4028, to be exact), though there is no ICE for me, even when compiling with /clr (provided you wrap files in #pragma managed( push, off ) / #pragma managed( pop ))

Mario, this forum is not for useless posts which bear no valuable content.
Back to top
View user's profile Send private message
Mario



Joined: 01 Jul 2006
Posts: 20

PostPosted: Mon Sep 25, 2006 4:29 pm    Post subject: Reply with quote

zeux wrote:
Though, I must admit, that the original post's author was slightly incorrect (...) Mario, this forum is not for useless posts which bear no valuable content.

Who does care about the W4 warnings? They are not compatibility issues. It's a nonsense. This fact is worth enough of mentioning.
Back to top
View user's profile Send private message
luke
Site Admin


Joined: 15 Oct 2004
Posts: 621

PostPosted: Wed Sep 27, 2006 3:06 am    Post subject: Reply with quote

Some w4 warnings can be useful, like the unintentional assignment assert above. From time to time TrueAxis is checked with all warnings turned on to check for some of these types of problems, but most of the warnings are on intentional behaviour. Even after turning off all the really silly warnings, it can still be hard to see the things that are logic erros inbetween the unimportant errors.

Still, as I said before, I believe most of the warnings with w4 are on intentional behaviour. For example, there is a fair bit of code involving macros that relies on code such as "if (constant) {}", which generates a w4 warning.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    trueaxis.com Forum Index -> Bugs All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group