Bill Allombert on Sat, 27 Jun 2009 16:46:39 +0200


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

Re: Pari svn on MSVC


On Sat, Jun 27, 2009 at 01:07:15AM +0100, Jason Moxham wrote:
>> Does that cause a compiler failure ? Even gcc 2.95 handles that.
>>
>
> yes
> eg  jay.c is
> ----------
> int     main(void)
> {
> const int n=10;
> long a[n];
> return 0;}
> ------------
>
> cl jay.c
> Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.21022.08 for 
> 80x86
> Copyright (C) Microsoft Corporation.  All rights reserved.
>
> jay.c
> jay.c(4) : error C2057: expected constant expression
> jay.c(4) : error C2466: cannot allocate an array of constant size 0
> jay.c(4) : error C2133: 'a' : unknown size

OK, what is the C standard supported by this compiler ?
Can it be switched to C99 mode ?

(I do not know whether this code is C89 compliant. It is certainly
C99 compliant since C99 allows array size to be computed at run-time)

Cheers,
Bill.