This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

C++ Bug with strings


Hi,
I expect this to print 0 instead of 1.

[kunert@ptpp03 /work]$ cat test2.cc

#include <string>
int main()
{
    return string("blah!") == "";
}

[kunert@ptpp03 /work]$ g++ test2.cc
[kunert@ptpp03 /work]$ ./a.out || echo Bug! 
Bug!
[kunert@ptpp03 /work]$ g++ -v
Reading specs from /opt/lib/gcc-lib/i686-pc-linux-gnu/2.96/specs
gcc version 2.96 20000824
(experimental)                                        


Regards,
Thomas

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]