Sign in to follow this  
zerochen

After unreachable code wrong error msg

Recommended Posts

zerochen    542
Hi,

this code leads to a wrong error msg.

[CODE]
void dum()
{}

int dummy()
{
return 0;
dum();
//return 1;
}
[/CODE]
output:
player.as (35, 2) : INFO : Compiling int CPlayer::dummy()
player.as (38, 3) : WARN : Unreachable code
player.as (36, 2) : ERR : Not all paths return a value

If you uncomment the last line it works. it works also with an int a; instead of a func call

Share this post


Link to post
Share on other sites
WitchLord    4678
I've fixed this in revision 1482.

Besides removing the misleading 'Not all paths return a value', I also change the message 'Unreachable code' to be an error rather than a warning.

Regards,
Andreas

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this