c/5647: ternary with bit value assignment as parameter
craig@svensons.com
craig@svensons.com
Sat Feb 9 19:06:00 GMT 2002
>Number: 5647
>Category: c
>Synopsis: ternary with bit value assignment as parameter
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Feb 09 16:16:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: Craig Svenson
>Release: gcc-3.0.3
>Organization:
>Environment:
powerpc-ibm-aix4.3.2.0
AIX 'C' version 5.0
>Description:
#define SET_BINFO_MARKED(NODE) (TREE_VIA_VIRTUAL(NODE)?SET_CLASSTYPE_MARKED(BINF
O_TYPE(NODE)):(TREE_LANG_FLAG_0(NODE)=1))
"cp/pt.c", line 8370.9: 1506-226 (S) The ":" operator is not allowed between "void" and "unsigned int:1".
make: 1254-004 The error code from the last command is 1.
In the AIX 'C' compiler SET_BINFO_MARKED(NODE) assumes a reurn type of void. The ternary is returning unsigned int.
>How-To-Repeat:
>Fix:
#define SET_BINFO_MARKED(NODE) (TREE_VIA_VIRTUAL(NODE)?SET_CLASSTYPE_MARKED(BINF
O_TYPE(NODE)): (void) (TREE_LANG_FLAG_0(NODE)=1))
cast the assignment to void. This repairs many files where this macro is used.
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-bugs
mailing list