Another area where gcc compiles fine while tcc issues an error.
Essentially:
int i;
i = strlen(s);
int s2[i]; //tcc doesn't like this.
tcc's error message is: wrong3.c:9: constant expression expected
Code attached (21 lines).
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
void someFunc(char* s) {
int i;
i = strlen(s);
int s2[i]; //tcc doesn't like this.
printf("size of s2: %d\n", sizeof(s2));
}
main() {
char *a = "hi this is a string.";
printf("string: %s\n", a);
someFunc(a);
exit(EXIT_SUCCESS);
}
_______________________________________________
Tinycc-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/tinycc-devel