[Bug c++/17452] New: ~ operator on bool type
bygoh at genting dot com dot my
gcc-bugzilla@gcc.gnu.org
Mon Sep 13 08:01:00 GMT 2004
GCC version: 3.2.3
System type: Linux Redhat 7
Complete code snippet:
#include <stdio.h>
int main () {
bool bar;
b = 1;
b = ~b;
printf ("%x", bar);
return 0;
}
Compiler options: -Wall
The value printed from the resulting executable showed the value of 'bar' to
be '1' instead of the expected boolean value '0'.
--
Summary: ~ operator on bool type
Product: gcc
Version: 3.2.3
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: bygoh at genting dot com dot my
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17452
More information about the Gcc-bugs
mailing list