~mcf/cproc

ref: 0e9f74cb67f2227f888e9a127624f77d83aee270 cproc/cc.h -rw-r--r-- 8.9 KiB
Use enum type for expr->builtin.kind
Use a common member for expression op
Free functions when we're done with them
Fix integer promotion on bit-fields

Fixes #47.
expr: Use tokstr in ++/-- operator error messages
Keep track of type properties in type
Make basic types have their own kind
Shorten some names with 'long'
Improve token descriptions in errors
Implement bit-field initializers
Implement __builtin_types_compatible_p

This is used by util-linux.
Initial support for loading/storing bit-fields
Revert "Fold constexpr function into intconstexpr"

This reverts commit a080e36dac54b82beef63580f36cb0da9ad31788.
Track type qualifiers separately

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).
Separate unqualified type and qualifiers in struct decl
Separate unqualified type and qualifiers in struct member
Separate unqualified type and qualifiers in struct param
Separate unqualified type and qualifiers in struct expr
expr: Use separate fields for lvalue and decayed instead of flags
Move type definitions to the top of cc.h
Next