This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Value not equal to itself
- From: Jordan Foster <jrdnfstr92 at gmail dot com>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 26 May 2012 20:25:36 -0700
- Subject: Value not equal to itself
gcc -v; gcc version 4.2.1 20070831 patched [FreeBSD]
uname -srip; FreeBSD 9.0-RELEASE i386 GENERI
Compiler command; gcc47 minimalErroringCode.cpp -o minimalErroringCode
Test; ./minimalErroringCode
Expected; no output
Result; Assertion failed: ((buffer[0] = 0xFF) && buffer[0] == 0xFF),
function main, file minimalErroringCode.cpp, line 4.
#include <cassert>
int main() {
char buffer[1024];
assert((buffer[0] = 0xFF) && buffer[0] == 0xFF);
return 0;
}