This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
SegFault by using strcmp
- From: chenk <k dot chen at eos-it-services dot com>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 26 Jul 2007 09:00:56 -0700 (PDT)
- Subject: SegFault by using strcmp
Hi,
I know, wenn man uses strcmp(const char* s1, const char* s2), Null pointer
values for s1 and s2
are treated the same as pointers to empty strings.
But I can only get SegFault in my application, because s1 or s2 sometimes
may be NULL.
I am using g++ version 3.4.3 20041212 (Red Hat 3.4.3-9.EL4),
glibc-2.3.4-2
libstdc++-v3
auf AMD86-64
Is it a bug?
Thanks
--
View this message in context: http://www.nabble.com/SegFault-by-using-strcmp-tf4152553.html#a11813540
Sent from the gcc - bugs mailing list archive at Nabble.com.