Age | Commit message (Collapse) | Author | |
---|---|---|---|
2019-02-24 | Remove obsolete function declaration | Michael Forney | |
2019-02-24 | Check for negative array lengths/indices | Michael Forney | |
2019-02-24 | Add __alignof__ definition by default | Michael Forney | |
2019-02-24 | driver: Fix -E with no output specified | Michael Forney | |
2019-02-24 | Define __GNUC__=4 and __STRICT_ANSI__ by default | Michael Forney | |
We implement some GNU extensions that are used to implement certain libc features, like INF, NAN, alloca, and offsetof. | |||
2019-02-24 | Make __PRETTY_FUNCTION__ a synonym for __func__ | Michael Forney | |
2019-02-24 | Remove unnecessary spaces in keyword list | Michael Forney | |
This used to contain __builtin_va_list, so was longer than necessary. | |||
2019-02-24 | Remove unused field | Michael Forney | |
2019-02-24 | scan: Handle comments | Michael Forney | |
2019-02-24 | scan: Handle escaped newlines | Michael Forney | |
2019-02-23 | Check for any write errors | Michael Forney | |
2019-02-22 | Run cc-qbe directly in runtests | Michael Forney | |
This way, it completes much faster since we don't have to run the system preprocessor. | |||
2019-02-22 | Fix use of uninitialized character in string array | Michael Forney | |
String data in expressions is just an array and is not NULL-terminated. | |||
2019-02-22 | Make sure to zero the rest of an array initialized with a string | Michael Forney | |
2019-02-22 | Fix size of incomplete array types initialized with strings | Michael Forney | |
updatearray takes an index, so was allocating an extra byte. | |||
2019-02-22 | When & is applied to an array, it is no longer decayed | Michael Forney | |
2019-02-22 | Don't need CFLAGS with linking | Michael Forney | |
2019-02-22 | Simplify build status URL | Michael Forney | |
2019-02-22 | Implement __builtin_nanf for empty string literals | Michael Forney | |
2019-02-22 | Separate out built-in handling from postfixexpr | Michael Forney | |
2019-02-22 | Implement __builtin_inff | Michael Forney | |
2019-02-22 | Keep track of built-in kind in declaration | Michael Forney | |
Also, populate filescope with builtins outside of main. | |||
2019-02-22 | Only need to emit tentative definitions when compiling | Michael Forney | |
2019-02-22 | Simplify handling of arguments to cc-qbe a bit | Michael Forney | |
2019-02-22 | Implement __builtin_alloca | Michael Forney | |
2019-02-22 | Fix adding integer to pointer | Michael Forney | |
2019-02-21 | driver: Create output files in current directory | Michael Forney | |
2019-02-21 | Emit complete union type definitions instead of just using the first member | Michael Forney | |
2019-02-21 | Always expect at least one struct decl. | Andrew Chambers | |
2019-02-21 | driver: Fix -o - | Michael Forney | |
We need to distinguish between no output specified, and output specified to be standard out. | |||
2019-02-21 | Fix decay on qualified array types | Michael Forney | |
2019-02-20 | Use name parameter instead of tok.lit | Michael Forney | |
This was only called with tok.lit, so it didn't matter in practice. | |||
2019-02-20 | Remove some unused variables | Michael Forney | |
2019-02-20 | driver: Various improvements | Michael Forney | |
Use an input struct to keep track of information about an input. When creating an output name from an input with no extension, make sure to add a `.`. When linking, write intermediate objects to temporary files and remove them afterwards. Allow specifying language of input using `-x` flag. Allow reading from standard input by passing `-`. | |||
2019-02-20 | Fix emittype for unions | Michael Forney | |
Thanks to Andrew Chambers for the bug report. | |||
2019-02-20 | eval: Handle nested offset address constants | Michael Forney | |
2019-02-20 | Fix definitions for nested structs | Michael Forney | |
The QBE documentation suggested that the subtypes in an aggregate must be simple types, but they can actually be any type (this is necessary for getting the alignment and padding right between fields adjacent to the nested struct). | |||
2019-02-19 | Implement __builtin_va_copy | Michael Forney | |
2019-02-19 | Slight reorganization in expr.c | Michael Forney | |
2019-02-19 | Add mkunaryexpr helper | Michael Forney | |
2019-02-19 | Add missing lvalue conversions | Michael Forney | |
typeintpromote and typeargpromote assume they are dealing with an unqualified type, and return an incorrect result if they are given a qualified one. So, add an assert here. This was causing const integer types to get promoted to themselves due to missing lvalue conversions. Thanks to Andrew Chambers for the bug report and test case. | |||
2019-02-19 | Check that left hand side of assignment expression is an lvalue | Michael Forney | |
2019-02-18 | Pointer operands to + and - must be complete object types | Michael Forney | |
Also clean up a little and give some better error messages. | |||
2019-02-18 | void is an incomplete type | Michael Forney | |
2019-02-18 | Simplify test added in 9f964b7281 | Michael Forney | |
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 | |