aboutsummaryrefslogtreecommitdiff
path: root/init.c
AgeCommit message (Collapse)Author
2022-01-22Port to C99Michael Forney
2021-09-29Use unsigned long long for sizes and offsetsMichael Forney
We don't need exact-width integer types here.
2021-09-13qbe, init: Handle prefixed string literalsNihal Jere
2021-05-02expr: Include NUL-terminator in string expression dataMichael Forney
This will facilitate the support of wide-string literals. Based on patch from Nihal Jere.
2020-06-05Help gcc see that variables are not used uninitializedMichael Forney
2019-04-27init: Allow string literal initializers to be in bracesMichael Forney
2019-04-24Use a common member for expression baseMichael Forney
2019-04-21Keep track of type properties in typeMichael Forney
2019-04-17Implement bit-field initializersMichael Forney
2019-04-15init: Remove some unused includesMichael Forney
2019-04-15init: Improve parseinit performance for sequential initializersMichael Forney
Now, we only traverse the current initializer list to find the place to insert a designated initializer. Regular initializers always go after the previous one. Fixes #37.
2019-04-14init: Error on bit-field initializers for nowMichael Forney
2019-04-06Track type qualifiers separatelyMichael Forney
Using a special qualified type kind has a number of problems: - Important fields such as size, align, and incomplete may not be set, since the qualified type was created before a struct was completed. - When we don't care about type qualifiers (which is the usual case), we have to explicitly unqualify the type which is annoying and error-prone. Instead, in derived types, keep track of the qualifiers of the base type alongside the base type (similar to what is done for members, parameters, declarations, and expressions in the past few commits).
2019-04-05expr: Use separate fields for lvalue and decayed instead of flagsMichael Forney
2019-04-04Merge headers into cc.hMichael Forney
2019-03-15Start to handle overlapping initializersMichael Forney
2019-03-14Abbreviate tag namesMichael Forney
2019-03-12Allow string literals to initialize any array with character typeMichael Forney
2019-03-01init: Check for incomplete typesMichael Forney
Fixes #28.
2019-02-24Check for negative array lengths/indicesMichael Forney
2019-02-22Fix size of incomplete array types initialized with stringsMichael Forney
updatearray takes an index, so was allocating an extra byte.
2019-02-20Remove some unused variablesMichael Forney
2019-02-15Some small cleanupsMichael Forney
2019-02-15Don't embed anonymous struct members into parentMichael Forney
While this works nicely for structs, when unions are involved it makes it impossible to find the next member to initialize without keeping track of extra data per member.
2019-02-15Fix some potential uninitialized fieldsMichael Forney
2019-02-14Allow initializing array with longer stringsMichael Forney
2019-02-13Ignore qualifiers when parsing initializersMichael Forney
2019-02-12Initial importMichael Forney