1747980 Members
4212 Online
108756 Solutions
New Discussion юеВ

cadvise warnings itanium

 
SOLVED
Go to solution
Gary Laughton
New Member

cadvise warnings itanium

I tried running cadvise with aCC on an HP Integrity system. The compiler found no errors or warnings with the all warning options turned on. When I tried the compile with a cadvise wrapper some new warnings appeared.

The cadvise documentation states that the aCC compiler has the same static analysis features as cadvise, so I wouldn't expect new warnings. Could this have to do with the compiler and cadvise versions? I'm using aCC version A.06.20 and cadvise version C.02.05.

In general do newer versions of the compiler have better code analysis features?

Thanks
3 REPLIES 3
Dennis Handly
Acclaimed Contributor

Re: cadvise warnings itanium

Are you compiling with aCC +wlint? That should roughly match.
What type of extra warnings are you getting with cadvise?

>Could this have to do with the compiler and cadvise versions? I'm using aCC version A.06.20 and cadvise version C.02.05.

You need to look at the aCC compiler within C.02.05. But it is the same, since they were released at the same time.

The latest aC++ compiler is A.06.25.02, a whole release plus two patches after A.06.20.

Note: cadvise with PDB can detect warnings based on seeing multiple sources files. This is harder to do with aCC, unless using -ipo.
Gary Laughton
New Member

Re: cadvise warnings itanium

Yes, I'm using +wlint (and +w1). Here's a sample of the warnings cadvise, but not aCC, picks up:

Out of bound access (In expression "&pres_val[(int)itrn]". In this case an array is referenced using i and i+1 where i is incremented by a for loop. It's a valid message as on the last iteration i+1 would be outside the array.

variable "temp_pmt" is used before its value is set. In this case temp_pmt is passed to an sprintf() which sets off the warning. aCC does find these types of mistakes when the varaible is used in an expression (temp_pmt = temp_pmt + 1), but not when passed to a function.

Thanks for your assistance.
Dennis Handly
Acclaimed Contributor
Solution

Re: cadvise warnings itanium

>I'm using ... (and +w1).

(You should just use +w on Integrity or with aC++.)

>Here's a sample of the warnings cadvise, but not aCC, picks up:

Are you using +O2/-O with aC++? These two warnings are normally only produced when optimizing.