Operating System - HP-UX
1827303 Members
3248 Online
109961 Solutions
New Discussion

aCC difference in 1.27 and 3.30

 
Yogendra
Occasional Contributor

aCC difference in 1.27 and 3.30

HI,
I have an application(having modules in c and C++) which i have compiled and linked with aCC1.27. Now in the process of upgradation I need to compile the application with aCC 3.30 . Can anybody tel me what all is the difference between these two compiler and what all the points i have to take care during compilation.

3 REPLIES 3
A. Clay Stephenson
Acclaimed Contributor

Re: aCC difference in 1.27 and 3.30

First of all, aCC 3.30 is no longer current but in any case look in the file /opt/aCC/newconfig/RelNotes/ACXX.release.notes for changes. It is cumulative so that you will also see changes for intervening releases.

The good news is that well-written C or C++ should port with essentially no changes.

If it ain't broke, I can fix that.
Yogendra
Occasional Contributor

Re: aCC difference in 1.27 and 3.30

Actually i have a lmost ported the application but my application is giving following error at compile time to call of min() function.

Error 902: "fnd_str_err.cc", line 324 # Template deduction failed to find a match for the call to 'min' with signature 'void (long,int)'.
msgbuf_len = min( w_end - nxt_strt,MSGBUF ) ;

I dont know why its throwing this error.
Adam J Markiewicz
Trusted Contributor

Re: aCC difference in 1.27 and 3.30

Hi

It is complaining, while undec C++ 'min' is defined as template function, not as preprocessor macro:
template
inline const T& min( const T &a, const T&b )
{
return b < a ? b : a;
}

when you call it with arguments of two differrnt types (int and long), the compiler doesn't know which version you intended.

You cen either:
1.ensure both arguments have the same type (by casting one of them for example)
2.generate your own 'min' function with explicit argument types of your desire.

solution 1. is more obvious, while solution 2. could cover you all the cases, when 'min' is called with this arguments, and therefore you do not have to add casting to every place.


Good luck
Adam
I do everything perfectly, except from my mistakes