Board index » cppbuilder » Test case for internal backend error W1360

Test case for internal backend error W1360


2005-04-11 02:14:20 AM
cppbuilder101
Hi,
Try to build the following code to get an W1360 backend error with bcb6
Johnny Willemsen
//---------------------------------------------------------------------------
#pragma hdrstop
//---------------------------------------------------------------------------
template <typename TypeCodeType>
class MySequence
{
public:
/// Constructor.
MySequence ( TypeCodeType const & content_type) {}
};
class TypeCode
{
public:
TypeCode() {}
};
typedef TypeCode* TypeCode_ptr;
extern TypeCode_ptr const _tc_AnySeq;
namespace TAO
{
namespace TypeCode
{
MySequence < TypeCode_ptr const *>value (&_tc_AnySeq);
}
}
#pragma argsused
int main(int argc, char* argv[])
{
return 0;
}
//---------------------------------------------------------------------------
 
 

Re:Test case for internal backend error W1360

Well a class type of the name 'TypeCode' is declared followed by the
declaration of a namespace 'TAO' which contains a namespace
declaration with name class' name 'TypeCode' and the class type is not
part of it. Perhaps the compiler is pleading insanity. <g>
. Ed
Quote
Johnny Willemsen wrote in message
news:42596cff$ XXXX@XXXXX.COM ...

Hi,

Try to build the following code to get an W1360 backend error with
bcb6

Johnny Willemsen

//---------------------------------------------------------------------------

#pragma hdrstop

//---------------------------------------------------------------------------

template <typename TypeCodeType>
class MySequence
{
public:

/// Constructor.
MySequence ( TypeCodeType const & content_type) {}
};

class TypeCode
{
public:
TypeCode() {}
};

typedef TypeCode* TypeCode_ptr;

extern TypeCode_ptr const _tc_AnySeq;

namespace TAO
{
namespace TypeCode
{
MySequence < TypeCode_ptr const *>value (&_tc_AnySeq);
}
}



#pragma argsused
int main(int argc, char* argv[])
{
return 0;
}
//---------------------------------------------------------------------------




 

Re:Test case for internal backend error W1360

Hi,
You can just remove all namespace stuff, it seems to be not needed and then
the error is the same. Only removing the & from the MySequence prevents the
crash in the compiler.
Johnny
"Ed Mulroy [TeamB]" < XXXX@XXXXX.COM >wrote in message
Quote
Well a class type of the name 'TypeCode' is declared followed by the
declaration of a namespace 'TAO' which contains a namespace declaration
with name class' name 'TypeCode' and the class type is not part of it.
Perhaps the compiler is pleading insanity. <g>

. Ed

>Johnny Willemsen wrote in message
>news:42596cff$ XXXX@XXXXX.COM ...
>
>Hi,
>
>Try to build the following code to get an W1360 backend error with bcb6
>
>Johnny Willemsen
>
>//---------------------------------------------------------------------------
>
>#pragma hdrstop
>
>//---------------------------------------------------------------------------
>
>template <typename TypeCodeType>
>class MySequence
>{
>public:
>
>/// Constructor.
>MySequence ( TypeCodeType const & content_type) {}
>};
>
>class TypeCode
>{
>public:
>TypeCode() {}
>};
>
>typedef TypeCode* TypeCode_ptr;
>
>extern TypeCode_ptr const _tc_AnySeq;
>
>namespace TAO
>{
>namespace TypeCode
>{
>MySequence < TypeCode_ptr const *>value (&_tc_AnySeq);
>}
>}
>
>
>
>#pragma argsused
>int main(int argc, char* argv[])
>{
>return 0;
>}
>//---------------------------------------------------------------------------
>
>
>
>


 

{smallsort}

Re:Test case for internal backend error W1360

I don't know the exact reason for the error. Backend error may be
because the parser got confused. One way that could happened is a
loop of some kind where it interprets something which maps to
something else which maps to... etc, eventually mapping back to an
entity already in the chain.
. Ed
Quote
Johnny Willemsen wrote in message
news: XXXX@XXXXX.COM ...
Hi,

You can just remove all namespace stuff, it seems to be not needed
and then the error is the same. Only removing the & from the
MySequence prevents the crash in the compiler.
 

Re:Test case for internal backend error W1360

There is no problem with your code, classes and namespaces can have the same
names. So if BCB breaks here, it's a compiler bug.
--
----------------------------------------------------------------
Have we the courage and the will to face up to the immorality and
discrimination of the progressive tax, and demand a return to traditional
proportionate taxation? - Ronald Reagan
"Johnny Willemsen" < XXXX@XXXXX.COM >wrote in message
Quote
Hi,

You can just remove all namespace stuff, it seems to be not needed and
then the error is the same. Only removing the & from the MySequence
prevents the crash in the compiler.

Johnny