[HP aCC 6.16] bogus cadvise warning #20200 with +d on a conditional and for
statement
-------------------------------------------------------------------------------------
Key: STDCXX-785
URL: https://issues.apache.org/jira/browse/STDCXX-785
Project: C++ Standard Library
Issue Type: Bug
Components: External
Environment: HP C/aC++ B3910B A.06.16 [Nov 26 2007]
Reporter: Martin Sebor
------- Original Message --------
Subject: aCC 6.16 bogus warning #20200 with +d on a conditional and for
statement
Date: Tue, 18 Mar 2008 13:39:00 -0600
From: Martin Sebor <[EMAIL PROTECTED]>
Organization: Rogue Wave Software, Inc.
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Here's another bogus warning #20200. This one goes away if I drop +d,
or the first call to strchr(), or use s directly instead of assigning
it to ss in the for loop.
Martin
{noformat}
$ cat u.cpp && aCC -V -c +d +w u.cpp
#include <string.h>
char *s;
void foo () {
if (s && strchr (s, 'x')) {
for (const char *ss = s; *ss; ++ss) {
ss = strchr (ss, 'x');
if (!ss)
break;
}
}
}
aCC: HP C/aC++ B3910B A.06.16 [Nov 26 2007]
"u.cpp", line 10, procedure foo: warning #20200-D: Potential null pointer
dereference through ss is detected (null definition:u.cpp, line 10)
{noformat}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.