[ Usenet FAQs | Web FAQs | Documents | RFC Index ]
Part1 - Part2 - Part3 - Part4 - Part5 - Single Page
Top Document: comp.unix.aix Frequently Asked Questions (Part 4 of 5)
Previous Document: 2.11: Why does xlc complain about '(sometype *)somepointer = something'
Next Document: 2.13: Can the compiler generate assembler code?
-
Search the FAQ Archives
Part1 - Part2 - Part3 - Part4 - Part5 - Single Page
Top Document: comp.unix.aix Frequently Asked Questions (Part 4 of 5)
Previous Document: 2.11: Why does xlc complain about '(sometype *)somepointer = something'
Next Document: 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.
Top Document: comp.unix.aix Frequently Asked Questions (Part 4 of 5)
Previous Document: 2.11: Why does xlc complain about '(sometype *)somepointer = something'
Next Document: 2.13: Can the compiler generate assembler code?
Part1 - Part2 - Part3 - Part4 - Part5 - Single Page
[ Usenet FAQs | Web FAQs | Documents | RFC Index ]
Send corrections/additions to the FAQ Maintainer:
bofh@mail.teleweb.pt (Jose Pina Coelho)
Last Update October 22 2009 @ 05:22 AM