aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/c_type.h
Commit message (Collapse)AuthorAgeFilesLines
* type: make struct field offset an intlemon13 days1-1/+1
| | | | | Yes, I've ran into code with structures with fields past the 16 bit range.
* c: fix some compatible type declarationslemon13 days1-0/+1
| | | | | | | | | | | When K&R prototypes are present, definition of compatible types and composite types becomes recursive. For example `int f(int (*)())` should be compatible with `int f(int (*)(int))` etc
* C99 complex types MVPlemon2026-04-131-0/+2
| | | | | | | | | Missing: static eval of complex values, Silly inefficient implementation of equality comparisons between them The whole thing is pretty inefficient without proper aggregate mem2reg anyway
* frontend: accept zero size arrays and empty aggregateslemon2026-04-131-3/+5
| | | | | | GNU extension. Previously was overloading arraylength==0 to mean unsized array, now they are distinct with the type flag TFUNKNOWN marking unsized arrays & aggregates.
* c: remove inline 'backing' type tag for enumslemon2026-03-231-7/+3
| | | | | | | | | | It was meant as a micro-optimization but actually keeping it in sync was annoying. This for example was broken: ``` extern enum foo { ... } g_foo; enum foo g_foo; ```
* style: change uvlong -> u64int, vlong -> s64intlemon2026-03-221-1/+1
| | | | | Is much nicer. I don't know whether I want to do it for the other int types too. char and uchar are fine as bytes. u/short -> u/s16int, maybe.
* Rework handling of predefined macros.lemon2026-03-211-1/+2
| | | | And add some GCC predefs like __SIZE_TYPE__, __LONG_SIZE__, etc
* Use #pragma oncelemon2026-03-181-4/+2
|
* Refactor: use typedefs and CamelCase for aggregate typeslemon2026-03-181-39/+40
| | | | Looks nicer
* REFACTOR: finish renaminglemon2026-03-171-1/+1
|
* REFACTOR: move sources to src/lemon2026-03-171-0/+177