aboutsummaryrefslogtreecommitdiff
path: root/decl.c
AgeCommit message (Collapse)Author
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
2019-02-17Only need to read parameter declarations when identifier list is non-emptyMichael Forney
2019-02-17Improve old-style function declaration supportMichael Forney
Implement typecompatible for types created with non-prototype function declarations. Require a function definition with parameter declaration list after a declaration with a non-empty identifier list. Detect function definitions with parameter declaration lists containing types incompatible with the promoted types, and report an error for now.
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-15Rename emit.h -> backend.hMichael Forney
2019-02-15Use consume in a couple placesMichael Forney
2019-02-15Rearrange some fields in function typesMichael Forney
2019-02-15Initialize align variable in declspecsMichael Forney
This matches how it is done for storage class and function specifier.
2019-02-15Fix use of wrong align variable in structdeclMichael Forney
2019-02-14Allow initializing array with longer stringsMichael Forney
2019-02-13Make __builtin_va_list a built-in declaration, not keywordMichael Forney
2019-02-13Implement __builtin_va_argMichael Forney
2019-02-12Fix union sizes and member offsetsMichael Forney
2019-02-12Fix nested arraysMichael Forney
We need to traverse the type hierarchy from inside to out to calculate size/alignment of arrays.
2019-02-12Initial importMichael Forney