aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/c.c
Commit message (Collapse)AuthorAgeFilesLines
* IR: emit inline function standalone bodies lazily lemon2026-03-231-5/+12
| | | | | | | If a function is stashed for inlining and inlined in all of its callsites or unused, it never ends up in the object file. If any symbol reference to it is emitted, then it must be de-inlined (rematerialized), and this is done near the end before emitting the actual object file.
* c: __attribute__ after declarator lemon2026-03-231-0/+1
|
* c: __attribute__ in more places lemon2026-03-231-0/+2
|
* c: remove inline 'backing' type tag for enums lemon2026-03-231-1/+0
| | | | | | | | | | 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 -> s64int lemon2026-03-221-16/+16
| | | | | 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.
* IR: add 3rd operand to Instr lemon2026-03-221-3/+3
| | | | | The motivation is for aarch64 msub/madd instrs, for isel to produce. But it should be useful for other things too.
* Rework handling of predefined macros. lemon2026-03-211-3/+3
| | | | And add some GCC predefs like __SIZE_TYPE__, __LONG_SIZE__, etc
* c: fix crash with dead code in condexpr lemon2026-03-201-1/+2
|
* c: better preserve source location in some cases lemon2026-03-201-2/+4
|
* io: make -w suppress notes too lemon2026-03-201-6/+6
|
* c: fix isboollike() for phis lemon2026-03-191-2/+3
|
* c: fix qualifiers for array declarators lemon2026-03-191-7/+10
| | | | | | `const int x[]` was being treated as `const int x[const]`, which is wrong, and matters when `x` is a function parameter that really decays to a pointer (`int const *const x`)
* ir: do not always try to put small literals in .text lemon2026-03-191-3/+3
| | | | | OpenBSD enforces read xor execute (XOM) even in x86-64. Not aware of any other platforms that do this.
* c: remove unused initialization of decl.align lemon2026-03-191-3/+3
| | | | | The intent is for _Alignas declarations but those aren't implemented yet. And initializing that field in declarator() can mess with .sym.
* c: fix edge cases with zero sized bitfields and static initializers lemon2026-03-181-7/+6
|
* Refactor: use typedefs and CamelCase for aggregate types lemon2026-03-181-498/+502
| | | | Looks nicer
* Refactor: move some utils from antcc.h to their own headers lemon2026-03-171-0/+1
|
* REFACTOR: finish renaming lemon2026-03-171-4/+4
|
* REFACTOR: move sources to src/ lemon2026-03-171-0/+4772