Repository navigation
Commit fc1fc50
Christopher Bazley
Pass unqualified aggregate values through an ellipsis
When an argument has no corresponding parameter type, TCC can carry
the qualifiers of a structure or union lvalue into its outgoing copy.
On x86-64, passing a const structure on the stack then produces a
spurious assignment of read-only location warning.
Remove the top-level qualifiers from the aggregate argument value in
the path shared by variadic and unprototyped calls. Exercise the copy
by passing a const volatile structure and reading it with va_arg.1 parent 56b7510 commit fc1fc50
2 files changed
Lines changed: 13 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
14 | 24 | | |
15 | 25 | | |
16 | 26 | | |
17 | | - | |
| 27 | + | |
18 | 28 | | |
19 | 29 | | |
20 | | - | |
21 | 30 | | |
| 31 | + | |
22 | 32 | | |
23 | 33 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
0 commit comments