Bug in VC++.net 2002: nested structs 
Author Message
 Bug in VC++.net 2002: nested structs

Hi!

I have a class that contains several nested structs:

public __abstract __gc class Foo
{
public:
  __value struct Struct1
  { /** };

  __value struct Struct2
  { /** };

  __value struct Struct3
  { /** };

  __value struct Struct4
  { /** };

[...]

Quote:
};

However, that maximum number of nested structs seems to be 17. Whenever I
add the 18ths struct, I get an internal compiler error.

Is this a confirmed bug?

Regards,
Andre



Thu, 06 Oct 2005 00:43:52 GMT  
 Bug in VC++.net 2002: nested structs

Quote:

> Hi!

> I have a class that contains several nested struts:

<snip>

Quote:
> However, that maximum number of nested struts seems to be 17. Whenever I
> add the 18ths strict, I get an internal compiler error.

> Is this a confirmed bug?

See the compiler documentation on "compiler limits"

The standard is a little loose on these kinds of limits; most
of them are _recommended_ minimums, rather than required
minimums. In any case, VC is documented _not_ to
implement the recommended minimum in this area.

Perhaps the VC team has some ideas on whether these
limits are intended to be raised in the next compiler
release?



Sat, 08 Oct 2005 20:23:13 GMT  
 Bug in VC++.net 2002: nested structs

Quote:
> > Hi!

> > I have a class that contains several nested struts:
> <snip>

> > However, that maximum number of nested struts seems to be 17. Whenever I
> > add the 18ths strict, I get an internal compiler error.

> > Is this a confirmed bug?

> See the compiler documentation on "compiler limits"

> The standard is a little loose on these kinds of limits; most
> of them are _recommended_ minimums, rather than required
> minimums. In any case, VC is documented _not_ to
> implement the recommended minimum in this area.

> Perhaps the VC team has some ideas on whether these
> limits are intended to be raised in the next compiler
> release?

We fixed the "internal compiler error" but haven't raised the limit.

Supporting unlimited nesting depth is difficult for some technical reasons,
and merely bumping up the limit is not very interesting. But if this is
important to you, I can raise this issue in our team. (Although I can
hardly imagine anyone writing code like this, so you'll have to help me
make a convincing case!)

--
Artur Laksberg, Visual C++ Team
This posting is provided AS IS with no warranties, and confers no rights.



Tue, 11 Oct 2005 02:15:16 GMT  
 Bug in VC++.net 2002: nested structs


<snip>

Quote:
> Supporting unlimited nesting depth is difficult for some technical reasons,
> and merely bumping up the limit is not very interesting. But if this is
> important to you, I can raise this issue in our team.

Not important to me, personally, no.

Quote:
> (Although I can
> hardly imagine anyone writing code like this, so you'll have to help me
> make a convincing case!)

I think this kind of code is representative of code generated
by various tools. This is _very_ common on *nix platforms,
and many *nix compilers accept this kind of thing without
complaint. There are several areas where VC is comparatively
deficient with auto-generated code. It's just not a common
enough technique on the Windows platform.


Tue, 11 Oct 2005 10:01:32 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. ATL component written in VC.NET 2002 won't register on non .NET machine

2. ATL component written in VC.NET 2002 won't register on non .NET machine

3. Make Windows Form Application with VC++.NET 2002 using a visual form

4. VC++.NET (2002):Fatal Error C1189-Please use the /MD switch for _AFXDLL builds

5. Managed VC++.NET (2002): Run the .exe file in the Debug or Release Folder

6. How to run an Excel 2002 macro from VC++.Net

7. MyDll-Executable for Debugging Session in VC++.NET (2002)

8. Compile error on generated ActiveX MFC wrapper class ( VC++7, VS.NET 2002 )

9. resx-files in vc++.net 2002

10. Can't Install VC++.NET 2002

11. Incremental linker bug in VC++6/SP5 and VC++.NET

12. Problem reusing idl interface with VC++.NET (nested interfaces)

 

 
Powered by phpBB® Forum Software