[Speex-dev] CVS compilation and EVC++ 4.0
Ralph Giles
giles at xiph.org
Tue Dec 20 10:24:51 PST 2005
On Tue, Dec 20, 2005 at 09:57:13AM -0800, Duane Storey wrote:
> Yeah, MSVC doesn't like that notation.. You can use alloca which allocates
> stuff on the stack instead I believe.
Ok. I've filed a bug against gcc. We'll see what happens. :)
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25504
BTW, 'gcc -ansi -pedantic' warns about a lot more variable-size arrays
than the one we've discussed in mdf.c. Could MSVC have some kind of
partial support? Can you try the attached test case (from the gcc bug)
and confirm it fails?
-r
-------------- next part --------------
/* test file for variable array sizes */
#include <stdio.h>
int func(int N)
{
int array[N];
int i, v;
for (i = 0; i < N; i++) {
array[i] = i;
}
v = 0;
for (i = 0; i < N; i++) {
v += array[i];
}
return v;
}
int main(int argc, char *argv[])
{
int N = 100;
int v = 0;
v = func(N);
printf("func(%d) = %d\n", N, v);
return 0;
}
More information about the Speex-dev
mailing list