aboutsummaryrefslogtreecommitdiff
path: root/expr.c
AgeCommit message (Collapse)Author
2019-03-12scan: Add support for prefixed string literals and character constantsMichael Forney
2019-02-24Check for negative array lengths/indicesMichael Forney
2019-02-22When & is applied to an array, it is no longer decayedMichael Forney
2019-02-22Implement __builtin_nanf for empty string literalsMichael Forney
2019-02-22Separate out built-in handling from postfixexprMichael Forney
2019-02-22Implement __builtin_inffMichael 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-22Fix adding integer to pointerMichael Forney
2019-02-21Fix decay on qualified array typesMichael Forney
2019-02-20Remove some unused variablesMichael Forney
2019-02-19Implement __builtin_va_copyMichael Forney
2019-02-19Slight reorganization in expr.cMichael Forney
2019-02-19Add mkunaryexpr helperMichael Forney
2019-02-19Add missing lvalue conversionsMichael 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-19Check that left hand side of assignment expression is an lvalueMichael Forney
2019-02-18Pointer operands to + and - must be complete object typesMichael Forney
Also clean up a little and give some better error messages.
2019-02-17Fix sizeof with unparenthesized postfix or compound literal expressionMichael Forney
Determining whether it is a typename or unparenthesized expression requires consuming the '(', so we need to call postfixexpr/parseinit ourselves.
2019-02-17Ensure right number of arguments to non-prototype function definitionsMichael Forney
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-15Fix hex escape in char literals.Andrew Chambers
2019-02-14When subtracting pointers, divide after subtractionMichael Forney
The pointers might be global addresses, and it doesn't make sense to divide them before subtracting.
2019-02-13Fix decay on qualified array typesMichael Forney
2019-02-13Fold constexpr function into intconstexprMichael 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-13Add some missing lvalue conversionsMichael Forney
2019-02-13Implement __builtin_va_argMichael Forney
2019-02-13expr: Perform lvalue conversion on array and index in subscript expressionsMichael Forney
2019-02-12Fix adding pointer to integerMichael Forney
2019-02-12Allow overflow/underflow when parsing floating constantsMichael Forney
2019-02-12Initial importMichael Forney