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]
Other format: [Raw text]

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.


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