title: Wrong code structure accepted by GCC/G++
body: <p>Using the GCC/G++ compiler, I've used the following code structure for a long time and never had any problem with it:</p>
  
  <pre><code>if((int returnCode = function(argument1, argument2)) != 0) {
      manageTheError(returnCode);
  }
  </code></pre>
  
  <p>I switched to Visual C++ 2015, but now my code throws many errors everytime I use this structure: (translated from french)</p>
  
  <pre><code>Syntax error: missing ')' before identifier 'returnCode' (line 1)
  'returnCode': undeclared identifier (line 1)
  Syntax error: '!=' (line 1)
  Syntax error: ')' (line 1)
  Syntax error: missing ';' before '{' (line 1)
  ')' was expected (line 1)
  expression was expected (line 1)
  'returnCode': undeclared identifier (line 2)
  identifier 'returnCode' undefined (line 2)
  </code></pre>
  
  <p>As <a href="https://stackoverflow.com/questions/7836867/c-variable-declaration-in-if-expression">this question</a> explains, my code structure is wrong and should not be used. But why does GCC/G++ accept it without complaining (not even a warning) and how does it manage these structures?</p>