bug-commoncpp
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: More Compiler Errors: Visual C++ .NET (7.0)


From: David Sugar
Subject: Re: More Compiler Errors: Visual C++ .NET (7.0)
Date: Sat, 20 Dec 2003 06:26:40 -0500
User-agent: KMail/1.5.3

Originally I assumed later VS compilers (7.0, net, etc) would correctly 
support dynamic sized local heap arrays.  There is a controlling #if that 
checked the _MSC_VER to see if it was newer than 6.0 for this.  Appearently 
that is not the case.  I eventually replaced this with a new config symbol, 
DYNAMIC_LOCAL_ARRAYS, which is tested for, and which is NOT defined in the 
w32/config.h header.  Eventually I will make an autoconf case for testing for 
this on posix systems that are not using gcc , based on try_compile.  In any 
case, this is all updated in sf cvs for 1.1.

On Friday 19 December 2003 09:24 am, Tobias Erbsland wrote:
> More compile errors here:
>
> file.cpp
> d:\commoncpp2\src\file.cpp(1545) : error C2057: expected constant
> expression d:\commoncpp2\src\file.cpp(1545) : error C2466: cannot allocate
> an array of constant size 0
> d:\commoncpp2\src\file.cpp(1545) : error C2133: 'left' : unknown size
> d:\commoncpp2\src\file.cpp(1583) : error C2057: expected constant
> expression d:\commoncpp2\src\file.cpp(1583) : error C2466: cannot allocate
> an array of constant size 0
> d:\commoncpp2\src\file.cpp(1583) : error C2133: 'next_token' : unknown size
>
> The expression:
>
> char foo[<size>];
>
> should replaced by char* foo = new char[<size>];
>
> on each "return", a delete foo!
>
>
> regards
> Tobias





reply via email to

[Prev in Thread] Current Thread [Next in Thread]