~mcf/cproc

ref: a71a7975c95b794983c4b83a26981c7b4d7f7c82 cproc/cc.h -rw-r--r-- 8.7 KiB
Use a common member for expression base
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
Next