aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-04-07Makefile: Don't use $< outside of inference rulesMichael Forney
In POSIX make, the meaning $< is unspecified outside of inference rules.
2019-04-07Change $(objdir) instead of $(srcdir) for stage2 and stage3 buildsMichael Forney
This is a bit simpler, and avoids issues with FreeBSD make when including deps.mk (since the source files listed there are not relative to $(srcdir)). To do this, we need to make use of make(1) pattern substitutions, which are not yet standard (though accepted for issue 8[0]). Also, since the path of the object files seems to end up the resulting executables, breaking byte-wise comparison, make sure to strip the resulting executables. [0] http://austingroupbugs.net/view.php?id=519
2019-04-07expr: Handle parenthesized paremeter name in __builtin_va_startMichael Forney
FreeBSD defines va_start(ap, last)=__builtin_va_start((ap), (last))
2019-04-07driver: Use argv[0] to determine cc-qbe path if /proc/self/exe is not availableMichael Forney
2019-04-07driver: Make sure we have room for the '\0' byteMichael Forney
2019-04-06driver: Include signal.h for kill(2)Michael Forney
2019-04-06Use common code for checking for compatibility of base type for derived typesMichael Forney
2019-04-06Simplify a couple loopsMichael Forney
2019-04-06arg: Use (void *)0 instead of NULL in error case of conditional expressionMichael Forney
Even though NULL is a null pointer constant, the comma expression with NULL at the end is not. So, we must ensure that either the type of the comma expression is `char *` or `void *`, and we don't know this for NULL.
2019-04-06expr: Just use `unsigned long long` when calculating integer constant typeMichael Forney
Ideally, we shouldn't use uint64_t at all since it is not guaranteed to exist, and this case is easy enough to fix.
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-06Separate unqualified type and qualifiers in struct exprMichael Forney
2019-04-05expr: Make lvalue default to false, and set where neededMichael Forney
2019-04-05expr: Use separate fields for lvalue and decayed instead of flagsMichael Forney
2019-04-05Fix _Alignas with type specifierMichael Forney
2019-04-04Move type definitions to the top of cc.hMichael Forney
2019-04-04Use `enum tokenkind` for op in struct exprMichael Forney
2019-04-04Remove unnecessary forward struct declarationsMichael Forney
2019-04-04Merge headers into cc.hMichael Forney
2019-04-03Error on bit-field access for nowMichael Forney
2019-04-03Parse bit-fieldsMichael Forney
2019-04-03Revert "Make member access its own expression type"Michael Forney
This reverts commit b3865e402e426387d4cdccdcd249a02d5ba1bc05. This breaks member address expressions in static initializers. We can support bit-fields by instead adding a "bit-field" expression that affects loads and stores to the underlying object.
2019-04-03Make member access its own expression typeMichael Forney
2019-04-01Add structbuilder to keep track of state when parsing struct specifierMichael Forney
2019-03-29Remove unused struct partialtypeMichael Forney
2019-03-15Start to handle overlapping initializersMichael Forney
2019-03-15__builtin_constant_p doesn't need to consider address constantsMichael Forney
2019-03-14Don't need a table of int maximumsMichael Forney
2019-03-14Use precedence climbing to parse binary expressionsMichael Forney
2019-03-14Abbreviate tag namesMichael Forney
2019-03-13Drop base parameter from mktypeMichael Forney
2019-03-13Use instruction op for varargs call instead of "ellipsis" valueMichael Forney
2019-03-13Update __PRETTY_FUNCTION__ commentMichael Forney
2019-03-13Make `struct function` opaqueMichael Forney
2019-03-12Allow string literals to initialize any array with character typeMichael Forney
2019-03-12Implement __builtin_constant_pMichael Forney
2019-03-12Sort built-insMichael Forney
2019-03-12scan: Add support for prefixed string literals and character constantsMichael Forney
2019-03-12scan: Accept leading `.` in pp-numberMichael Forney
2019-03-12Revert "Zero uninitialized decls/returns."Michael Forney
This reverts commit 7722c7593a1a249e1a6d98d84afdff3cb086ca81. This causes problems with large stack allocations, such as https://github.com/madler/pigz/blob/fe822cb435622c43f491013da77b127e9fe851a9/pigz.c#L3403-L3405
2019-03-03Fix emittype for qualified nested structMichael Forney
We don't have to strip qualifiers off of array types since array types can only be qualified when used in a parameter declaration before adjustment.
2019-03-01init: Check for incomplete typesMichael Forney
Fixes #28.
2019-03-01Array element cannot have incomplete or function typeMichael Forney
2019-03-01Add -M and -MM to support our own makefile.Andrew Chambers
2019-02-28Set __GNUC__=3 and __GNUC_MINOR__=3 by defaultMichael Forney
2019-02-27Implement __typeof__.Andrew Chambers
2019-02-26Use funcinst macro in a few more placesMichael Forney