Operating System - Linux
1753534 Members
4945 Online
108795 Solutions
New Discussion юеВ

aC++ New compiler error -AA

 
SOLVED
Go to solution
Kevin Normandy
Occasional Advisor

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.
11 REPLIES 11
Dennis Handly
Acclaimed Contributor

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.
Kevin Normandy
Occasional Advisor

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.
Dennis Handly
Acclaimed Contributor

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.
Kevin Normandy
Occasional Advisor

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?
Dennis Handly
Acclaimed Contributor
Solution

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.

Kevin Normandy
Occasional Advisor

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.
James R. Ferguson
Acclaimed Contributor

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=4b080f1bace021100f1bace02110275d6e10RCRD#11

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

Regards!

...JRF...
Kevin Normandy
Occasional Advisor

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.