Operating System - HP-UX
1752290 Members
4704 Online
108786 Solutions
New Discussion юеВ

Re: aCC A.03.57 compiler problem

 
SOLVED
Go to solution
Anatoly Pidruchny
Occasional Contributor

aCC A.03.57 compiler problem

Here is a small code that demonstrates what I believe is a compiler bug. Please confirm. This code compiles successfully with the A.03.56 compiler. Please copy-paste it to the file aCC357Bug.cpp and compile using "aCC -c -o aCC357Bug.o aCC357Bug.cpp". The error that I am getting is:
Error 698: Exact position unknown; near ["aCC357Bug.cpp", line 32]. #
The declarations "void *ns2::__catchTp_v[5]" and "void
*ns1::__catchTp_v[5]" are both visible and neither is
preferred under the name lookup rules.

#include

namespace ns1
{
class A
{
public:
string a[1];
A()
{
}
};
}

namespace ns2
{
class B
{
public:
B();
};

B::B()
{
string b[1];
}
}

using namespace ns1;
using namespace ns2;

void f()
{
try
{
}
catch (...)
{
}
}
2 REPLIES 2
Mike Stroyan
Honored Contributor
Solution

Re: aCC A.03.57 compiler problem

This looks very similar to a recently filed defect against aCC A.03.57.
I will pass on the test case.

You can work around the error for now by adding
these lines before the '#include ' line.

namespace ns1 {} using namespace ns1;
namespace ns2 {} using namespace ns2;
Anatoly Pidruchny
Occasional Contributor

Re: aCC A.03.57 compiler problem

Mike, thank you very much for answering and passing on this test case. The work around works fine.