Parent document is top of "comp.unix.aix Frequently Asked Questions (Part 4 of 5)"
Previous document is "2.11: Why does xlc complain about '(sometype *)somepointer = something'"
Next document is "2.13: Can the compiler generate assembler code?"

2.12: Some more common errors

Here are a few other common errors with xlc:

305 |     switch((((np)->navigation_type) ? (*((np)->navigation_type)) :
      ((void *)0)))
      .a...........  
a - 1506-226: (S) The second and third operands of the conditional
operator must be of the same type.

The reason for this is that xlc defines NULL as (void *)0, and it does
not allow two different types as the second and third operand of ?:. 
The second argument above is not a pointer and the code used NULL
incorrectly as a scalar. NULL is a nil pointer constant in ANSI C and
in some traditional compilers.

You should change NULL in the third argument above to an integer 0.

Parent document is top of "comp.unix.aix Frequently Asked Questions (Part 4 of 5)"
Previous document is "2.11: Why does xlc complain about '(sometype *)somepointer = something'"
Next document is "2.13: Can the compiler generate assembler code?"