C5912: Code in 'if' and 'else' part are the same

[INFORMATION]

Description

The Compiler has detected that the code in the `if' and the code in the `else' part of an `if-else' construct is the same. Because regardless of the condition in the `if' part, the executed code is the same, so the compiler replaces the condition with `TRUE' if the condition does not have any side effects. There is always a couple of this message, one for the `if' part and one for the `else' part. This message may be generated during tree optimizations (Option -Ont to switch it off).

Example
  if (condition) {  // replaced with 'if (1) {'

  
    statements;  // message C5912 here ...

  
  } else {

  
    statements;  // ... and here

  
  }

  
Tips

Check your code why both parts are the same. Maybe different macros are used in both parts which evaluates to the same values.