aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/compiler/testdata/consts.txt
Commit message (Collapse)AuthorAgeFilesLines
* pkg/compiler: support if[expr] attributesAleksandr Nogikh2024-02-191-0/+1
| | | | | | | | | | | | | | | | | | | The expression may either include integers/consts or reference other fields in the structure via value[field1:field2:field3]. The fields on this path must all belong to structures and must not have any if conditions themselves. For unions, mandate that the last field has no conditions (it will be the default one). For structs, convert conditional fields into fields of a union type of the following form: anonymous_union [ value T (if[expression]) void void ]
* prog, pkg/compiler: alignment for integer rangesPaul Chaignon2019-10-251-1/+1
| | | | | | | | | Enables the syntax intN[start:end, alignment] for integer ranges. For instance, int32[0:10, 2] represents even 32-bit numbers between 0 and 10 included. With this change, two NEED tags in syscall descriptions can be addressed. Signed-off-by: Paul Chaignon <paul.chaignon@orange.com>
* pkg/compiler: check for unused declarationsDmitry Vyukov2018-06-301-0/+3
| | | | | Error on unused structs/unions/resources/flags. Finds tons of bugs.
* pkg/compiler: add size attribute for structsDmitry Vyukov2018-03-051-0/+4
| | | | The size attribute allows to pad a struct up to the specified size.
* pkg/compiler: allow unions as syscall argumentsDmitry Vyukov2018-02-231-1/+1
| | | | | If all union options can be syscall arguments, allow the union itself as syscall argument.
* pkg/compiler: support type templatesDmitry Vyukov2018-01-131-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Netlink descriptions contain tons of code duplication, and need much more for proper descriptions. Introduce type templates to simplify writing such descriptions and remove code duplication. Note: type templates are experimental, have poor error handling and are subject to change. Type templates can be declared as follows: ``` type buffer[DIR] ptr[DIR, array[int8]] type fileoff[BASE] BASE type nlattr[TYPE, PAYLOAD] { nla_len len[parent, int16] nla_type const[TYPE, int16] payload PAYLOAD } [align_4] ``` and later used as follows: ``` syscall(a buffer[in], b fileoff[int64], c ptr[in, nlattr[FOO, int32]]) ```
* pkg/compiler: more static error checkingDmitry Vyukov2017-08-271-0/+24
Update #217