aboutsummaryrefslogtreecommitdiff
path: root/decl.c
AgeCommit message (Collapse)Author
2019-05-19decl: Allow zero length arraysMichael Forney
gcc allows this, and glibc uses it in some headers instead of flexible array members.
2019-05-18decl: Give a better error message when a VLA is usedMichael Forney
2019-05-16decl: Qualifiers of array type are for element typeMichael Forney
2019-05-16decl: extern storage class with initializer is still a definitionMichael Forney
2019-05-15Implement asm labelsMichael Forney
2019-05-15decl: Don't emit function if inline is specified without static or externMichael Forney
This partially addresses #42. Now, no duplicate definitions will be emitted, but we also don't emit a definition when a later declaration is specified with extern.
2019-05-14Use correct terminology in error messageMichael Forney
2019-05-14decl: Factor out some code common to function and object declarationsMichael Forney
2019-05-12Improve error message and simplify slightlyMichael Forney
2019-04-27Unnamed bit-fields don't contribute to size or alignment of unions, or size ↵Michael Forney
of structs
2019-04-27Fix some function declarator corner casesMichael Forney
2019-04-24Use a common member for expression baseMichael Forney
2019-04-24Free functions when we're done with themMichael Forney
2019-04-24Disallow struct members with function typeMichael Forney
2019-04-21Keep track of type properties in typeMichael Forney
2019-04-20Make basic types have their own kindMichael Forney
2019-04-20Shorten some names with 'long'Michael Forney
2019-04-17Merge map.h and tree.h into util.hMichael Forney
2019-04-17Just use a single mapkey functionMichael Forney
2019-04-17htab -> mapMichael Forney
2019-04-17Fix bit-field offsets in unionsMichael Forney
2019-04-17Implement bit-field initializersMichael Forney
2019-04-16Use undecayed type in __typeof__Michael Forney
2019-04-15Silence gcc warningMichael Forney
2019-04-15decl: Fix uninitialized access with unnamed bit-fieldsMichael Forney
2019-04-14decl: Make signedness of enum types match gccMichael Forney
2019-04-13decl: Allow `register` in old-style parameter declarationsMichael Forney
2019-04-06Simplify a couple loopsMichael 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-06Separate unqualified type and qualifiers in struct declMichael Forney
2019-04-06Separate unqualified type and qualifiers in struct memberMichael Forney
2019-04-06Separate unqualified type and qualifiers in struct paramMichael Forney
2019-04-05Fix _Alignas with type specifierMichael Forney
2019-04-04Merge headers into cc.hMichael Forney
2019-04-03Parse bit-fieldsMichael Forney
2019-04-01Add structbuilder to keep track of state when parsing struct specifierMichael Forney
2019-03-29Remove unused struct partialtypeMichael Forney
2019-03-14Abbreviate tag namesMichael Forney
2019-03-13Drop base parameter from mktypeMichael Forney
2019-03-01Array element cannot have incomplete or function typeMichael Forney
2019-02-27Implement __typeof__.Andrew Chambers
2019-02-24Check for negative array lengths/indicesMichael Forney
2019-02-22Keep track of built-in kind in declarationMichael Forney
Also, populate filescope with builtins outside of main.
2019-02-22Implement __builtin_allocaMichael Forney
2019-02-21Always expect at least one struct decl.Andrew Chambers
2019-02-20Use name parameter instead of tok.litMichael Forney
This was only called with tok.lit, so it didn't matter in practice.
2019-02-19Implement __builtin_va_copyMichael Forney
2019-02-18Fix compatible check for basic typesMichael Forney
This check was only supposed to return true for enum types and their corresponding integer type. However, it had the side effect of making 'int' compatible with 'unsigned'. To fix this, introduce a new basic type kind for enums with the same rank as 'int', that is only compatible with itself and the 'int' type with the matching sign. Thanks to Andrew Chambers for the bug report.
2019-02-17Disallow functions returning array or functionMichael Forney
2019-02-17Only parse function definitions for function declarationsMichael Forney