Operating System - Linux
1752439 Members
5440 Online
108788 Solutions
New Discussion юеВ

Re: Crashing the aCC compiler when using namespace aliases

 
Gail Baker
New Member

Crashing the aCC compiler when using namespace aliases

While trying to get STLport 5.0 to compile using aCC (versions A.03.52 and A.03.63) I've run into a compiler crash. The crash occurs when redefining a namespace alias. Here's a reduced down example of the problem:

namespace std { }
namespace stlport = std;
namespace stlport = std;

This code causes the aCC compiler to crash with the following stack dump:

aCC -c nameSpaceProblem.cpp
OOPS!! Namespace ::code not implemented
( 0) 0x00330418 oops__F11StringTokenPCc + 0x6c [/opt/aCC/lbin/ctcom.pa20]
( 1) 0x0028080c code__9NamespaceFv + 0x18 [/opt/aCC/lbin/ctcom.pa20]
( 2) 0x001dbd50 ProcessExternalDeclaration__8CompilerFP11Declarationb + 0x528 [/opt/aCC/lbin/ctcom.pa20]
( 3) 0x001d09a4 ProcessExternalDeclarationList__8CompilerFP11Declaration + 0x2e0 [/opt/aCC/lbin/ctcom.pa20]
( 4) 0x001aecdc doReduction1__FiR12ScannerValueP12ScannerValue + 0x33c [/opt/aCC/lbin/ctcom.pa20]
( 5) 0x001adecc yyparse__Fv + 0xce8 [/opt/aCC/lbin/ctcom.pa20]
( 6) 0x00248788 DoCompile__8CompilerFv + 0x23c [/opt/aCC/lbin/ctcom.pa20]
( 7) 0x000b3c9c DoCompile__8CompilerFP6Buffer + 0x34 [/opt/aCC/lbin/ctcom.pa20]
( 8) 0x00260eb4 DoCompileFile__8CompilerFPc + 0x25c [/opt/aCC/lbin/ctcom.pa20]
( 9) 0x002585dc main + 0x6c0 [/opt/aCC/lbin/ctcom.pa20]
(10) 0xc0143430 _start + 0xc0 [/usr/lib/libc.2]
(11) 0x001c8738 $START$ + 0x178 [/opt/aCC/lbin/ctcom.pa20]
3 REPLIES 3
Stephen Keane
Honored Contributor

Re: Crashing the aCC compiler when using namespace aliases

Why would you want to redefine stlport to be an alias for std, twice?
Steve Steel
Honored Contributor

Re: Crashing the aCC compiler when using namespace aliases

Hi

I checked though the current status and this has been reported and a fix has been asked.

Comment the 2nd statement would make the errors go away.So do not do this since it is the result of a coding fault.

It will be fixed in a future release

Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Gail Baker
New Member

Re: Crashing the aCC compiler when using namespace aliases

Thanks for the info. Yes, I would agree that redefining the stlport namespace twice isn't the best thing to do. However, this was how STLport 5.0 RC4 release was doing it. The HP aCC compiler was the only platform that had a problem dealing with this issue. Sun CC, Windows VC++ and Linux gcc all handled this assignment without complaint.

I also have found out that this isn't a crash but a very ugly warning message. The compiler actually generates code. Does it generate correct code? I'm not sure yet.

Anyway, I hope the lab will solve this problem. This OOPS message and stack dump really doesn't instill confidence in the compiler.

Thanks again!
Gail