>-Werror=return-type will treat just that warning as an error.

amendment for that: that is a really good thing (TM). Because should in a 
release build the execution really reach the code path without a return 
statement, the returned value will be random. This leads to undefined behavior 
down the path and really hard to debug crashes. 

If you want to signalize that a code path is unreachable, just throw an 
exception there. 


-- 
https://code.launchpad.net/~widelands-dev/widelands/ai_return_added/+merge/275638
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/ai_return_added.

_______________________________________________
Mailing list: https://launchpad.net/~widelands-dev
Post to     : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to