This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/17452] New: ~ operator on bool type
- From: "bygoh at genting dot com dot my" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Sep 2004 08:01:12 -0000
- Subject: [Bug c++/17452] New: ~ operator on bool type
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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