The following program miscompiles as of TCC 0.9.27:

#include <stdio.h>

int
main (void)
{
  size_t n = 10;
  int a[n];
  printf ("%p\n%p\n", (void *)a, (void *)*&a);
}

The second address is off. GCC 10.2.0, among others, handles this correctly.

Pointers to constant-length arrays work as intended (and indeed have the same 
representation as the address of the first element of the target array).

_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to