Commit 544682c
committed
Do not accept arrays of variable size with static lifetime
Neither Clang nor GCC accept these. In addition to rejecting such declarations,
also fix the off-by-one error reported in #525: type declarations are type
checked before their symbols are processed, thus the symbol name needs to be set
up early. A lookup via the symbol table, however, is not yet possible. Thus
maintain the full symbol.
Fixes: #5251 parent 40d1560 commit 544682c
File tree
5 files changed
+44
-9
lines changed- regression/ansi-c/Array_Declarator8
- src/ansi-c
5 files changed
+44
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
49 | | - | |
50 | 48 | | |
51 | 49 | | |
52 | 50 | | |
| |||
703 | 701 | | |
704 | 702 | | |
705 | 703 | | |
| 704 | + | |
706 | 705 | | |
707 | 706 | | |
708 | 707 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
551 | 552 | | |
552 | 553 | | |
553 | 554 | | |
554 | | - | |
| 555 | + | |
555 | 556 | | |
556 | | - | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
557 | 564 | | |
558 | 565 | | |
559 | 566 | | |
| |||
564 | 571 | | |
565 | 572 | | |
566 | 573 | | |
567 | | - | |
| 574 | + | |
568 | 575 | | |
569 | 576 | | |
570 | 577 | | |
| |||
573 | 580 | | |
574 | 581 | | |
575 | 582 | | |
576 | | - | |
577 | | - | |
| 583 | + | |
| 584 | + | |
578 | 585 | | |
579 | 586 | | |
580 | 587 | | |
581 | 588 | | |
582 | | - | |
| 589 | + | |
583 | 590 | | |
584 | 591 | | |
585 | 592 | | |
| |||
0 commit comments