this code doesnt compiles with gcc ,the bug is because tcc allows to
compile such expressions?
can you explain it better?
a.c: In function ‘main’:
a.c:8: warning: format ‘%X’ expects type ‘unsigned int’, but argument 2
has type ‘int *’
a.c:8: warning: format ‘%X’ expects type ‘unsigned int’, but argument 3
has type ‘int *’
a.c:10: error: invalid use of array with unspecified bounds
a.c:10: error: invalid use of array with unspecified bounds
a.c:10: warning: format ‘%X’ expects type ‘unsigned int’, but argument 2
has type ‘pList’
a.c:10: warning: format ‘%X’ expects type ‘unsigned int’, but argument 3
has type ‘pList’
Alexei wrote:
#include stdio.h
int arr[2];
typedef intList[];
typedef List* pList;
pList pa;
int main(int argc, char **argv)
{
printf([0]=%X [1]=%X\n,arr[0],arr[1]);
pa = arr;
printf([0]=%X [1]=%X\n,pa[0],pa[1]);
}
Runtime:
[0]=4020D0 [1]=4020D4
[0]=4020D0 [1]=4020CC
___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/tinycc-devel
___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/tinycc-devel