Re: aC++ New compiler error -AA (376 Views)
Reply
Occasional Advisor
Kevin Normandy
Posts: 11
Registered: ‎06-19-2007
Message 1 of 12 (376 Views)
Accepted Solution

aC++ New compiler error -AA

I have a number of C++ routines that compile fine under -AP but when we go -AA, in a number of routines I get.

Error 140: "/opt/aCC/include_std/limits" line 596 #Invalid numeric constant.
_RWSTD_SPECIALIZE_LIMITS ( Unsigned char,
^^^^^^^^^^^^^^^^^^^^^^^^

That is the only change I made - the compiler flag. I am not explicitly including in any of the routines that get this error.

Any leads would be appreciated.
Acclaimed Contributor
Dennis Handly
Posts: 25,286
Registered: ‎03-06-2006
Message 2 of 12 (376 Views)

Re: aC++ New compiler error -AA

What version of the compiler are you using?

You may be running into a problem with evil macros. Compile with +legacy_cpp and see what the error line looks like.
Occasional Advisor
Kevin Normandy
Posts: 11
Registered: ‎06-19-2007
Message 3 of 12 (376 Views)

Re: aC++ New compiler error -AA

I'm on HP-UX 11.00
aC++ = A.03.30
That's what my help page says.

aCC: warning 901: unknown option: `+legacy_cpp': use +help for online documentation.

Same error

Error 140: "/opt/aCC/include_std/limits", line 596 # Invalid numeric constant.
_RWSTD_SPECIALIZE_LIMITS (unsigned char,

I appreciate you assistance.
Acclaimed Contributor
Dennis Handly
Posts: 25,286
Registered: ‎03-06-2006
Message 4 of 12 (376 Views)

Re: aC++ New compiler error -AA

A.03.30 is an obsolete version. The last for 11.00 is A.03.55.

>aCC: warning 901: unknown option: +legacy_cpp:

You'll have to compile with -E -.i and then look at the .i file produced. Then look for the preprocessed line and check for evil macros.

Or take that .i file and compile it and see if the compiler points to the problem.

>That is the only change I made - the compiler flag.

Unless you have kept portability in mind, when you use -AA, you have to do a port.
Occasional Advisor
Kevin Normandy
Posts: 11
Registered: ‎06-19-2007
Message 5 of 12 (376 Views)

Re: aC++ New compiler error -AA

Hey Dennis,

A.03.30 is obsolete - is it de-supported?

I do the exapansion thing and compile it and I get

Error 140: "/opt/aCC/include_std/limits", line 596 # Invalid numeric constant.
max () throw() { return 7_MAX; } static const bool is_signed = (7_MIN != 0); static const bool is_integer = (true);
^^^^^
Error 140: "/opt/aCC/include_std/limits", line 596 # Invalid numeric constant.
c const bool is_exact = (true); static const int digits = (1 == 7_MAX ? 1 : (8 * sizeof (unsigned char) - is_signed
^^^^^
Error 140: "/opt/aCC/include_std/limits", line 596 # Invalid numeric constant.
t bool is_bounded = (true); static const bool is_modulo = (1 != 7_MAX); static const bool traps = (false); static c
^^^^^
Error 140: "/opt/aCC/include_std/limits", line 596 # Invalid numeric constant.
cialized = (true); static unsigned char min () throw() { return 7_MIN; } static unsigned char max () throw() { retu
^^^^^
Error 140: "/opt/aCC/include_std/limits", line 596 # Invalid numeric constant.
{ return 7_MIN; } static unsigned char max () throw() { return 7_MAX; } static const bool is_signed = (7_MIN != 0)
^^^^^
7_MAX and 7_MIN seem to be the next suspects.
What do you think?
Acclaimed Contributor
Dennis Handly
Posts: 25,286
Registered: ‎03-06-2006
Message 6 of 12 (376 Views)

Re: aC++ New compiler error -AA

>A.03.30 is obsolete - is it de-supported?

Yes. Essentially it was, as soon as the next patch was released, in Sept 2001.

>7_MAX and 7_MIN seem to be the next suspects.

Exactly. You have a macro UCHAR that is 7.
You need to undef it.

This bug wasn't fixed until A.03.33.

Occasional Advisor
Kevin Normandy
Posts: 11
Registered: ‎06-19-2007
Message 7 of 12 (376 Views)

Re: aC++ New compiler error -AA

Hey Dennis,
That got it.
Many thanks.

What are the dates on the newest C and C++ compilers for HP_UX 11.0?
You told me A.03.55 is the last for C++.
When was that released?

And my C compiler is from 2000.
Acclaimed Contributor
Dennis Handly
Posts: 25,286
Registered: ‎03-06-2006
Message 8 of 12 (376 Views)
Acclaimed Contributor
James R. Ferguson
Posts: 21,184
Registered: ‎07-06-2000
Message 9 of 12 (376 Views)

Re: aC++ New compiler error -AA

Hi Kevin:

For C, you might also find this summary useful:

http://h21007.www2.hp.com/portal/site/dspp/PAGE.template/page.document?ciid=4b080f1bace021100f1bace0...

Remember, HP-UX 11.0 (and its products) went out of support December 2006.

Regards!

...JRF...
Occasional Advisor
Kevin Normandy
Posts: 11
Registered: ‎06-19-2007
Message 10 of 12 (376 Views)

Re: aC++ New compiler error -AA


Hi James,

Thanks for the note.

Desupported means I cannot get any updates on any products, correct?

I have to move the machine to a current HP_UX level to get any upgrades for
compilers?

I'm a developer, not an IT guys so thanks for your patience.
Acclaimed Contributor
James R. Ferguson
Posts: 21,184
Registered: ‎07-06-2000
Message 11 of 12 (376 Views)

Re: aC++ New compiler error -AA

Hi (again) Kevin:

Out-of-Support means that no new fixes or enhancements will be released. However, HP does a good job of keeping patches to old releases available.

If you hava a Support Contract, you may be able to fetch the last updates and Application CD contents for which you were licensed for 11.0, dated April 2004. Go to SUM and choose 11.0.

https://www1.itrc.hp.com/service/sum/downloadSelectProducts.do

Dennis' link provides a really nice guide to patches for the compilers. Couple that with the last patch bundle for 11.0 and/or search the ITRC Patch database for a specific patch, and you should find that you can update your compiler to some level more than you have:

https://www1.itrc.hp.com/service/patch/releasePage.do?BC=main|releaseIndexPage|&releaseId=5013-2091

https://www1.itrc.hp.com/service/patch/search.do?BC=main|&pageOsid=hpux

Regards!

...JRF...
Occasional Advisor
Kevin Normandy
Posts: 11
Registered: ‎06-19-2007
Message 12 of 12 (376 Views)

Re: aC++ New compiler error -AA

works
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.