Common Errors

If you enable the Possible Errors setting, the compiler generates a warning if it encounters common errors such as the following:

if (a=b) f(); // WARNING: a=b is an assignment
if ((a=b)!=0) f(); // OK: (a=b)!=0 is a comparison, no warning
if (a==b) f(); // OK: (a==b) is a comparison, no warning

a == 0; // WARNING: This is a comparison.
a = 0; // OK: This is an assignment, no warning

while (i++); // WARNING: Unintended infinite loop

If you intended to create an infinite loop, put white space or a comment between the while statement and the semicolon.

These statements suppress the above errors or warnings.

while (i++) ; // OK: White space separation, no warning
while (i++) /*: Comment separation, no warning */ ;

The Possible Errors setting corresponds to the pragma warn_possunwant. To check this setting, use __option (warn_possunwant).

See Checking Option Settings for information on how to use this directive.