[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Tinycc-devel] Fwd: TCC VLA bug?
From: |
Stefanos |
Subject: |
[Tinycc-devel] Fwd: TCC VLA bug? |
Date: |
Fri, 3 Dec 2021 01:06:35 +0200 |
With `gcc -std=c99` and `gcc -std=c11` I get the - identical in both cases -
following output:
1 2 3 4 5
6 7 8 9 10
11 12 13 14 15
16 17 18 19 20
21 22 23 24 25
26 27 28 29 30
31 32 33 34 35
36 37 38 39 40
41 42 43 44 45
46 47 48 49 50
51 52 53 54 55
56 57 58 59 60
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
With `tcc -std=c99` though and `tcc -std=c11` I get completely different
results:
C99 output
----------
1 2 21 22 41
42 43 44 45 46
47 48 49 50 51
52 53 54 55 56
21 22 41 42 43
44 45 46 47 48
49 50 51 52 53
54 55 56 57 58
41 42 43 44 45
46 47 48 49 50
51 52 53 54 55
56 57 58 59 60
1 2 21 22 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
57 58 59 60 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
C11 output
----------
1 2 21 22 41
42 43 44 45 46
47 48 49 50 51
52 53 54 55 56
21 22 41 42 43
44 45 46 47 48
49 50 51 52 53
54 55 56 57 58
41 42 43 44 45
46 47 48 49 50
51 52 53 54 55
56 57 58 59 60
1 2 21 22 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
57 58 59 60 0 0 16391 0-107212368 22035-107212704 22035-107212592
22035 0 0 536872934 0 8 0
5 0-107212536 22035-107212648 22035-107212536 22035 0 0 536870912 0
-1 0 7 0-107212368 22035-107212592 22035
For some reason, it gives me the impression it seems '21' as `2+1` thus '3',
`2+2` thus '4', and so forth; I could be wrong though...
- [Tinycc-devel] Fwd: TCC VLA bug?,
Stefanos <=