Must return a value
One of the things that annoys me is that g++ lets me get away with not returning a value in a function that expects it. VC++ won't let me. So porting my game from Linux to Windows can be a pain when I discover that some stupid little function somewhere doesn't return a value. But g++ does give a warning, but I admit that I don't always pay attention to the warnings. Is there a pragma or something like that that lets me turn that specific warning into an error? Or is there some other way to get g++ to be a little more assertive about that (without doing something drastic like setting all warnings as errors)?
I like the DARK layout!
Don't know about g++, but I have to say I'm working in a team
with around 6+ developers, and we did switch "warnings as errors"
on (some people were ignoring warnings all the time).. Now, they can't :)
...and if you fix these (usually trivial things) immediately, you don't
end up with a huge pile of annoying warnings :)
with around 6+ developers, and we did switch "warnings as errors"
on (some people were ignoring warnings all the time).. Now, they can't :)
...and if you fix these (usually trivial things) immediately, you don't
end up with a huge pile of annoying warnings :)
visit my website at www.kalmiya.com
why not just use g++ on windows?
AMP Minibowling - Free asynchronous multiplayer mobile minigolf+bowling
[twitter]eedok[/twitter]
I typically use "-Wall -Wextra", and listen to all the warnings. If you don't trust yourself to listen to the warnings, there's nothing wrong with using "-Werror"
Really, though, you should listen to all the warnings that are given. Usually, they indicate something with your code that you should look at closely.
Really, though, you should listen to all the warnings that are given. Usually, they indicate something with your code that you should look at closely.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement