http://bugzilla.openwatcom.org/show_bug.cgi?id=1160
Summary: Ternary conditional operator isn't doing default
conversions
Product: Open Watcom C/C++ Compiler
Version: OW 1.9
Platform: All (Generic)
OS/Version: Windows 7
Status: UNCONFIRMED
Severity: normal
Priority: --
Component: wcl386.exe
AssignedTo:
openwatco...@openwatcom.org
ReportedBy:
alexf...@gmail.com
// file: ow3bug.c
// compile with OW 1.9: wcl386 /q ow3bug.c
// this ow3bug.exe prints "must print 0: 1", which is wrong
// compile with gcc 4.8.2: gcc ow3bug.c -o ow3bug.c
// this ow3bug.exe prints "must print 0: 0", which is correct
#include <stdio.h>
int main(void)
{
printf("must print 0: %d\n", -1 < ((-1)?0:0u));
return 0;
}
--
Configure bugmail:
http://bugzilla.openwatcom.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.