Age | Commit message (Collapse) | Author | |
---|---|---|---|
2019-02-18 | Fix compatible check for basic types | Michael 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-17 | Make enum types compatible with their corresponding integer type (int) | Michael Forney | |
2019-02-17 | Fix sizeof with unparenthesized postfix or compound literal expression | Michael Forney | |
Determining whether it is a typename or unparenthesized expression requires consuming the '(', so we need to call postfixexpr/parseinit ourselves. | |||
2019-02-17 | Allow computing address of non-lvalue structs/unions | Michael Forney | |
We currently compile '.' member access as taking the address of the struct, adding the offset, and then dereferencing as the member type. However, the '.' operator is allowed on non-lvalues, even though the '&' operator is not. So, we need to handle arbitrary struct/union expressions in objectaddr by just compiling them normally, then converting them to regular pointers (since struct/union values are just pointers with additional type information). | |||
2019-02-17 | Fix returning struct/union types | Michael Forney | |
2019-02-17 | Disallow functions returning array or function | Michael Forney | |
2019-02-17 | Only parse function definitions for function declarations | Michael Forney | |
2019-02-17 | Only need to read parameter declarations when identifier list is non-empty | Michael Forney | |
2019-02-17 | Ensure right number of arguments to non-prototype function definitions | Michael Forney | |
2019-02-17 | Improve old-style function declaration support | Michael 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-16 | Extend char/short types before comparing | Michael Forney | |
Thanks to Andrew Chambers for reporting the issue. | |||
2019-02-16 | Allow labels with same name as typedef | Michael Forney | |
2019-02-16 | Fix casts from integer types less than 32 bits wide | Michael Forney | |
2019-02-15 | Make sure that aggregates and pointers to aggregates are passed/return correctly | Michael Forney | |
2019-02-15 | Some small cleanups | Michael Forney | |
2019-02-15 | Handle main with no return | Michael Forney | |
2019-02-15 | Fix backwards constant evaluation of float-int casts | Michael Forney | |
2019-02-15 | Don't embed anonymous struct members into parent | Michael 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-15 | Use bool typedef in .c files | Michael Forney | |
2019-02-15 | Rename emit.h -> backend.h | Michael Forney | |
2019-02-15 | Use consume in a couple places | Michael Forney | |
2019-02-15 | Rearrange some fields in function types | Michael Forney | |
2019-02-15 | Remove a dead conditional in ftou | Michael Forney | |
2019-02-15 | Fix some potential uninitialized fields | Michael Forney | |
2019-02-15 | Initialize align variable in declspecs | Michael Forney | |
This matches how it is done for storage class and function specifier. | |||
2019-02-15 | Fix use of wrong align variable in structdecl | Michael Forney | |
2019-02-15 | Fix hex escape in char literals. | Andrew Chambers | |
2019-02-14 | Remove some leftover commented out stuff | Michael Forney | |
2019-02-15 | Fix bad assertion. | Andrew Chambers | |
2019-02-14 | Allow initializing array with longer strings | Michael Forney | |
2019-02-14 | Handle compound literals in global initializers | Michael Forney | |
2019-02-14 | When subtracting pointers, divide after subtraction | Michael Forney | |
The pointers might be global addresses, and it doesn't make sense to divide them before subtracting. | |||
2019-02-13 | driver: Remove debug printf | Michael Forney | |
2019-02-13 | driver: Ignore -std= and -pedantic | Michael Forney | |
2019-02-13 | config.def.h: Define __signed__, used by linux headers | Michael Forney | |
2019-02-13 | When storing initial value of parameters, use unqualified type | Michael Forney | |
2019-02-13 | Make __builtin_va_list a built-in declaration, not keyword | Michael Forney | |
2019-02-13 | Fix decay on qualified array types | Michael Forney | |
2019-02-13 | Fold constexpr function into intconstexpr | Michael Forney | |
We usually only care about integer constant expressions, and when we parse initializers, we need to handle non-constant expressions too, so we call eval explicitly when emitting global data. | |||
2019-02-13 | Add some missing lvalue conversions | Michael Forney | |
2019-02-13 | Ignore qualifiers when parsing initializers | Michael Forney | |
2019-02-13 | Make basic store independent of ABI | Michael Forney | |
2019-02-13 | Implement __builtin_va_arg | Michael Forney | |
2019-02-13 | Compare to node value first when looking for switch destination | Michael Forney | |
2019-02-13 | expr: Perform lvalue conversion on array and index in subscript expressions | Michael Forney | |
2019-02-13 | driver: Pass -idirafter to preprocessor | Michael Forney | |
2019-02-13 | Add missing trailing newlines | Michael Forney | |
2019-02-13 | check target depends on cc | Michael Forney | |
2019-02-12 | driver: Ignore -pipe flag | Michael Forney | |
2019-02-12 | Fix adding pointer to integer | Michael Forney | |