Back to the Vavoom Forum Archives


Forum

[1.21.1] VC Compiler does not check obligatory 'return'

Sun, 23 Jul 2006 17:45:03

Crimson Wizard

I found out occasionally that vcc.exe does not always checks obligatory 'return' statement. For example if I write:
int func (int a)
{
     if (a == 10)
          return 20;
}
No error will be detected. Then, this code MAY run in game, but sometimes will crash it. And it will be real headache to find your mistake.
Sun, 23 Jul 2006 20:49:57

Firebrand

I also noticed this before too, it seems a good idea to make this small change to the compiler for safety of development <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->.
Mon, 24 Jul 2006 17:45:16

Janis Legzdinsh

Yeah, definately.
Mon, 18 Jun 2007 07:53:46

Crimson Wizard

I confirm that this one is fixed.
Wed, 29 Aug 2007 07:57:57

Crimson Wizard

Well, I was mistaken, it's not fixed, at least for 1.24.

Back to the Vavoom Forum Archives