Age | Commit message (Collapse) | Author | |
---|---|---|---|
2021-10-20 | expr: Add support for wide string literals | Michael Forney | |
Thanks to Nihal Jere for his initial patches implementing this feature. Fixes #35. | |||
2021-10-03 | qbe: Remove some unused includes | Michael Forney | |
We now hard-code the float precision in the format string instead of using the float.h macros. The other headers were never used (except maybe prior to the first commit). | |||
2021-09-29 | Rename uint64_t field of constant union to u | Michael Forney | |
This will prepare us for adding a signed int64_t field called i. | |||
2021-09-29 | Use unsigned long long for sizes and offsets | Michael Forney | |
We don't need exact-width integer types here. | |||
2021-09-13 | Revert "Add stringconcat function to concatenate adjacent string literals" | Michael Forney | |
This reverts commit c16f07acf655b9f4fb006d8256b4027fb5a13aa8. This incorrectly allows octal escapes to span between adjacent string literals (e.g. "\0" "1" is not the same as "\01"). | |||
2021-09-07 | decl: Include location for _Complex/_Atomic error messages | Michael Forney | |
2021-09-06 | decl: Relax restrictions for 0-length array member | Michael Forney | |
Zero-length array members are quite common in linux UAPI headers, where they don't follow the restrictions of flexible array members. Since they are non-standard, relax the error checking for them, rather than considering them the same as a flexible array member. | |||
2021-09-06 | Fix type-checking of va_list arguments to varargs built-ins | Michael Forney | |
If the argument was a function parameter, its type has already been adjusted. So on x86_64, we can't just ignore the automatic array-to-pointer conversion, since it was never a pointer to begin with. Instead, keep track of the adjusted va_list type, and check that the arguments to varargs built-ins match that type. | |||
2021-08-15 | decl: Don't accept abstract function declarator when disallowed | Michael Forney | |
When declarator() is called with allowabstract == false, the caller can assume that it will always return the identifier being declared. However, abstract function declarators were incorrectly accepted in this case with name set to NULL instead of erroring out due to invalid syntax. To fix this, only skip forward to function declarator parsing for abstract declarators, since this is the only case where we can't immediately tell whether we have a parenthesized declarator or a function declarator. Fixes #74. | |||
2021-07-02 | qbe: Remove repr from struct value and use per-instruction class instead | Michael Forney | |
This way we avoid leaking backend-specific details of type representation outside qbe.c. It also facilitates some future simplifications. | |||
2021-07-01 | decl: Check that the flexible array member (if present) is last | Michael Forney | |
2021-07-01 | decl: Disallow members with incomplete types | Michael Forney | |
Make an exception for flexible array members, though we should also check that the flexible array member, if any, is last. | |||
2021-07-01 | decl: Check that struct/union has at least one member | Michael Forney | |
2021-06-28 | Add stringconcat function to concatenate adjacent string literals | Michael Forney | |
This function also ensures that the string prefixes (if any) are compatible. It should make it easier to implement wide string support. | |||
2021-04-11 | decl: Allow _Static_assert in struct declaration | Michael Forney | |
2021-04-11 | decl: Allow _Alignas(0) | Michael Forney | |
C11 6.7.5p6 says "An alignment specification of zero has no effect". | |||
2020-06-03 | Revert "decl: Allow out-of-range enum constants when they don't change type" | Michael Forney | |
This reverts commit 6229709b8ae21d7722fef48ad8a9f2f10b900030. I still don't understand how out-of-range enum constants are supposed to work. | |||
2020-06-03 | decl: Allow out-of-range enum constants when they don't change type | Michael Forney | |
gcc and clang allow enum constants out of range of int, but this means that the type of enumerator may differ inside and outside the enum specifier. Instead, only allow out-of-range enum constants when their types are compatible with the final enum type. | |||
2020-06-02 | decl: Improve error message for out-of-range enum constants | Michael Forney | |
2020-03-16 | decl: Simplify struct tag parsing slightly | Michael Forney | |
2020-01-30 | decl: Better check for inline definitions | Michael Forney | |
2020-01-30 | decl: Use list link to determine presence in tentative definition list | Michael Forney | |
2019-11-19 | decl: Parse array size as an assignment-expression | Michael Forney | |
Even though we don't support VLAs yet, we should still be parsing the VLA syntax, then failing after if it was not a constant expression. | |||
2019-08-13 | decl: Allow _Static_assert with no message | Michael Forney | |
This is accepted for C2X[0]. [0] http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2265.pdf | |||
2019-08-13 | decl: Separate _Static_assert handling to its own function | Michael Forney | |
2019-08-11 | decl: Allow enumerator values up to UINT_MAX | Michael Forney | |
2019-07-10 | decl: Display message when _Static_assert fails | Michael Forney | |
2019-06-18 | decl: _Thread_local is not yet supported | Michael Forney | |
2019-06-04 | Fix non-adjacent bit-fields | Michael Forney | |
2019-06-02 | decl: Disallow enumerator values that aren't representable as 'int' | Michael Forney | |
2019-05-19 | decl: Allow zero length arrays | Michael Forney | |
gcc allows this, and glibc uses it in some headers instead of flexible array members. | |||
2019-05-18 | decl: Give a better error message when a VLA is used | Michael Forney | |
2019-05-16 | decl: Qualifiers of array type are for element type | Michael Forney | |
2019-05-16 | decl: extern storage class with initializer is still a definition | Michael Forney | |
2019-05-15 | Implement asm labels | Michael Forney | |
2019-05-15 | decl: Don't emit function if inline is specified without static or extern | Michael 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-14 | Use correct terminology in error message | Michael Forney | |
2019-05-14 | decl: Factor out some code common to function and object declarations | Michael Forney | |
2019-05-12 | Improve error message and simplify slightly | Michael Forney | |
2019-04-27 | Unnamed bit-fields don't contribute to size or alignment of unions, or size ↵ | Michael Forney | |
of structs | |||
2019-04-27 | Fix some function declarator corner cases | Michael Forney | |
2019-04-24 | Use a common member for expression base | Michael Forney | |
2019-04-24 | Free functions when we're done with them | Michael Forney | |
2019-04-24 | Disallow struct members with function type | Michael Forney | |
2019-04-21 | Keep track of type properties in type | Michael Forney | |
2019-04-20 | Make basic types have their own kind | Michael Forney | |
2019-04-20 | Shorten some names with 'long' | Michael Forney | |
2019-04-17 | Merge map.h and tree.h into util.h | Michael Forney | |
2019-04-17 | Just use a single mapkey function | Michael Forney | |
2019-04-17 | htab -> map | Michael Forney | |