Operating System - Linux
1753773 Members
5194 Online
108799 Solutions
New Discussion юеВ

Need help HP aC++ Version 6.* compiler

 
nayeem khan
Occasional Advisor

Need help HP aC++ Version 6.* compiler

Hi

I am porting a product to aC++ version 6 compiler
currently we are using version 5

Old C++ Version =aCC: HP aC++/ANSI C B3910B A.05.52 [Sep 05 2003]

Current C++ Version = aCC: HP aC++/ANSI C B3910B A.06.06 [Nov 7 2005]

However in one of the module i am facing some errors,the error message is


"../../mdds/threadsafestl/iterator.h", line 39: error #2266: "input_iterator_tag
" is ambiguous
inline input_iterator_tag"

It compiles fine with version 5 compiler. I think in new version has come enhancement due to which i am getting this error.

I unserstand that compiler found two versions of "input_iterator_tag".

Can someone give me a hint ,how to solve this issue
3 REPLIES 3
Dennis Handly
Acclaimed Contributor

Re: Need help HP aCC6 compiler

Unfortunately without more of the error message or the whole instantiation trace back, it is kind of hard to determine what's wrong.

I don't see Error 2266 on our aCC5 to aCC6 page:
http://h21007.www2.hp.com/dspp/tech/tech_TechSoftwareDetailPage_IDX/1,1703,7274,00.html

This could be related to my answer in:
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1121620

It would help if you could provide more of line 39 and 40 to any "{" or ";".

Does the compiler tell you where the other input_iterator_tag is declared, so you can also show that?

You may have to compile with -E -.i to create a .i file any provide that, if you don't have any IP concerns.

nayeem khan
Occasional Advisor

Re: Need help HP aC++ Version 6.* compiler

Hi

thanks for your reply..i have searched HP site for that error..without success

here the compiler command
/opt/aCC.06.06/bin/aCC +DD32 -AA +nommap -DNO_GOOD_FLOAT2INT +inst_v +eh -O -DRW_MULTI_THREAD -D_REENTERANT -DTAO_HP -DTAO_32 +w +u1 -z -ext -D_LARGEFILE64_SOURCE -I/view/vikas_6126_hp1122/dvobs/TAO/ACE_wrappers -I/view/vikas_6126_hp1122/dvobs/TAO/ACE_wrappers/TAO -I/view/vikas_6126_hp1122/dvobs/TAO/ACE_wrappers/TAO/tao -I/view/vikas_6126_hp1122/dvobs/TAO/ACE_wrappers/TAO/orbsvcs/orbsvcs -I../../xmam -I../.. -I../../arobject -I../../repobj -I../../repobj/bison -I../../custlist -I../../../../base-libs/codebase/5.1mt -I../../mdds/threadsafestl -I../interface -I../../mdds/lib -DS4HPUX -D_THREAD_SAFE -DS4FOX -DS4OFF_OPTIMIZE -D__BIGGER_ALIAS__ -D__UNIX_NOCASE__ -DS4OFF_REPORT -DFOUR_GB -DNO_YIELD_THREAD -D__HPUX__ -DDB_OPT -D_UNICODE -DS4DEBUG -DWAN_OPTIMIZE -DNDEBUG -D__ALL_H_INCLUDED__ -DUSER_FUNC -DDOUBLES_ONLY -D__USECDX__ -D__CONFIG_REQD__ -D__FOR_INTEL_MEM__ -D__FOR_INTEL_BMK__ -D__FOR_COMPAQ__ -D__EXPORT__ -D__FYI_CONTROL__ -DCOMPDECOMP -D__FYI_HPUX__ -DNLM_CERT -D__ERROR_LOGGING__ -DHPUX_11 -DHP_STRICT_ANSI -mt -DTHREAD -DPTHREADS -D_KERNEL_THREADS -DPTHREAD_COMPAT_MODE -DACE_LACKS_CLEARERR -DACE_HAS_NO_THROW_SPEC +w +u1 -z -ext -D_LARGEFILE64_SOURCE -c mdds.cpp 2> err


I have attached the error file from version 6 compiler and warning from version 5 compiler

If i compile the same file with same options but with Version 5 compiler it compiles fine(ofcourse with warnings)

We are using a threadsafe STL,where its failing in iterator.h
below is the code,its failing at
"inline input_iterator_tag "
------------------code----------------
template
inline input_iterator_tag
iterator_category(const input_iterator&) {
return input_iterator_tag();
}
--------------------code----------------

Dennis Handly
Acclaimed Contributor

Re: Need help HP aC++ Version 6.* compiler

>I have attached the error file from version 6 compiler and ...

I only see the useless aCC5 warnings.
Warning 890: warning is being replaced by followed by "using namespace std;"

This may cause there to be two input_iterator_tag. One in std and one in the global namespace.

>We are using a threadsafe STL,

Why do you think you need this alternate STL?
Just compile with -AA -mt.

If you don't use HP's Standard C++ Library, you must compile with +nostl.

>+nommap +inst_v +eh -DRW_MULTI_THREAD

Remove +nommap. +inst_v doesn't work on IPF.
Remove +eh, since it is the default.
-DRW_MULTI_THREAD is not valid with -AA.
(Use -mt for threading.)

>where its failing in iterator.h
template
inline input_iterator_tag
iterator_category(const input_iterator&) {
return input_iterator_tag();
}

I doubt I can figure out anything without a .i file.

I recently had to change to remove all of the __iterator_category functions and replace by one:
template
inline _TYPENAME iterator_traits<_Iterator>::iterator_category
__iterator_category(const _Iterator&) {
typedef _TYPENAME iterator_traits<_Iterator>::iterator_category _IterCategory;
return _IterCategory();
}