As I have pointed out before, there is no requirement to warn about that, so "should" here is personal opinion, which happens to coincide with my personal opinion.The int will not fit inside Char, so it should trigger a warning because you are narrowing the size.
If blackcell used gcc on Unix, then I would consider it best to use the MinGW port of gcc anyway. On the other hand, using an entirely different compiler makes for good exposure to different tools.
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
GCC has lots of options like Wall -pedantic...and many others I cant remember, gives you all the warnings you want eheh. With CodeBlocks you can simply set it under settings/compiler and debugger, some are already there to chose, others you can add em manually.
Essential if you wanna use GCC IMHO:
http://www.network-theory.co.uk/docs/gccintro/
found what I wanted:
http://c-faq.com/resources/fn86.html
Last edited by 2112; 03-05-2008 at 06:01 AM.
As far as I can tell*, it will not emit the warnings Elysia mentioned even with what you found.GCC has lots of options like Wall -pedantic...and many others I cant remember, gives you all the warnings you want eheh.
found what I wanted:
http://c-faq.com/resources/fn86.html
* with the MinGW port of gcc 3.4.5
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
Ok, just tried with GCC 4.2.3 and using those options and it doesn't warn either.
Maybe there's some other option but I don't know...
'Twas I. http://cboard.cprogramming.com/showthread.php?t=99468
Well, I found a quote by someone else, anyway.
dwk
Seek and ye shall find. quaere et invenies.
"Simplicity does not precede complexity, but follows it." -- Alan Perlis
"Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
"The only real mistake is the one from which we learn nothing." -- John Powell
Other boards: DaniWeb, TPS
Unofficial Wiki FAQ: cpwiki.sf.net
My website: http://dwks.theprogrammingsite.com/
Projects: codeform, xuni, atlantis, nort, etc.