[TESTCASE] STDCXX-750 [HP aCC 6.16] Potential null pointer dereference in aliases.cpp

2008-03-20 Thread Scott Zhong
cat /build/scottz/t2.cpp aCC -V aCC -c +w /build/scottz/t2.cpp #include cstdlib int main() { static char * test = 0; if (!test) { test = (char *)std::malloc (12345); *test = '\0'; } return 0; } aCC: HP C/aC++ B3910B A.06.16 [Nov 26 2007] /build/scottz/t2.cpp, line 8,

Re: [TESTCASE] STDCXX-750 [HP aCC 6.16] Potential null pointer dereference in aliases.cpp

2008-03-20 Thread Martin Sebor
I was going to say this is the same bug as STDCXX-764: http://issues.apache.org/jira/browse/STDCXX-764 but after looking at it more closely I believe the compiler is correct in this case because malloc() returns 0 when it fails to allocate memory. The warning could be clearer about it. Martin

RE: [TESTCASE] STDCXX-750 [HP aCC 6.16] Potential null pointer dereference in aliases.cpp

2008-03-20 Thread Scott Zhong
aCC 6.16] Potential null pointer dereference in aliases.cpp I was going to say this is the same bug as STDCXX-764: http://issues.apache.org/jira/browse/STDCXX-764 but after looking at it more closely I believe the compiler is correct in this case because malloc() returns 0 when it fails

Re: [TESTCASE] STDCXX-750 [HP aCC 6.16] Potential null pointer dereference in aliases.cpp

2008-03-20 Thread Martin Sebor
-Original Message- From: Martin Sebor [mailto:[EMAIL PROTECTED] On Behalf Of Martin Sebor Sent: Thursday, March 20, 2008 12:02 PM To: dev@stdcxx.apache.org Subject: Re: [TESTCASE] STDCXX-750 [HP aCC 6.16] Potential null pointer dereference in aliases.cpp I was going to say