aboutsummaryrefslogtreecommitdiffhomepage
path: root/c
Commit message (Collapse)AuthorAgeFilesLines
* cpp: get rid of unnecessary ugly global variable for lexing header name lemon2026-03-051-31/+23
| | | | Make it a parameter.
* cpp: implement #include MACRO_NAME lemon2026-03-051-55/+98
|
* cpp: #include".." shouldn't look in working directory lemon2026-03-051-6/+8
|
* c: do not try to eval conditional expression's not taken branch lemon2026-03-051-2/+0
|
* driver: fix -pthread, -U lemon2026-03-021-1/+5
|
* add bswap16/32/64 lemon2026-03-023-32/+77
| | | | | - frontend: __builtin_bswapX intrinsics - backend: ObswapX instructions
* cpp: fix token spacing edge case when empty macros are involved lemon2026-03-011-1/+5
|
* cpp: fix token spacing (#2) (hopefully) lemon2026-03-012-35/+80
|
* c: static intializer bugfix introduced in6c3f1593e9 lemon2026-02-281-0/+1
|
* cpp: allow comments between function-like macro name and arguments lemon2026-02-261-8/+27
|
* c: allow casting of symbol address to intptr_t in static initializers lemon2026-02-252-2/+4
|
* preprocessor: use shared static buffers for replacement lists lemon2026-02-251-150/+178
| | | | | | | One for macro definitions' bodies, another one for function-like macros with substituted arguments in the macro expansion stack. Cuts down on a lot of individual allocations. #undef'd macros' replacement lists are "leaked" but that is very minor
* fix various warnings lemon2026-02-241-1/+1
|
* diagnostics: also print #include provenance for warnings lemon2026-02-242-3/+4
|
* C23 true and false keywords lemon2026-02-241-3/+5
|
* cpp: fix __has_builtin lemon2026-02-231-2/+8
|
* cpp: add __COUNTER__ macro lemon2026-02-231-131/+172
|
* c: fix using string literal as conditional expression conditional lemon2026-02-221-12/+28
|
* preprocessor: fix an edge case with erroneously recursive macro expansion lemon2026-02-221-26/+42
|
* cpp: better diagnostics lemon2026-02-211-13/+40
|
* c: fix default argument promotion for function types lemon2026-02-211-0/+1
|
* ir: basic inlining pass implementation lemon2026-02-181-1/+2
|
* cpp: add __VA_OPT__ and comma ## __VA_ARGS__ pasting lemon2026-02-061-5/+40
|
* c: support at least parsing C99 _Complex types lemon2026-01-252-5/+16
|
* c: GNU __attribute__ stubs lemon2026-01-253-10/+71
|
* driver: -iquote, -isystem, etc lemon2026-01-121-15/+27
| | | | With GCC-like search order
* cpp: prioritize internal headers over system headers lemon2026-01-101-6/+6
|
* Add version tracking. Starting at 0.1.0 lemon2026-01-091-4/+14
|
* c: fix use after free lemon2026-01-091-1/+2
| | | | | A silly one, declsbuf.p can be realloc'd in the call to putdecl, but in this statement that pointer could be fetched before the call.
* cpp: fix pasting ident+keyword lemon2026-01-091-4/+7
|
* lexer: multibyte escape seqs in wide character literal lemon2026-01-091-4/+13
| | | | (hacky)
* c: allow 'register' in func parameter lemon2026-01-091-1/+1
|
* cpp: fix multiline comment in skipped preprocessor directive lemon2026-01-091-2/+16
|
* cpp: fix single-line comment after preprocessor directive lemon2026-01-091-1/+1
| | | | It was eating up the newline token
* c: fix diagnostic with "return <undeclared>" lemon2025-12-311-2/+2
|
* backend: separate instrs for integer/float store lemon2025-12-311-5/+5
|
* c: SYM expr should store decl ref as an index, not pointer lemon2025-12-303-52/+59
| | | | | | | | Because envdecls (now declsbuf) can be resized and invalidate those pointers. I missed this because the default initialization size of that buffer (and the fact that it would mostly only manifest with function-local expressions) made it not really come up in practice. Silly
* cpp: nicer handling of predefined macros lemon2025-12-291-40/+29
|
* backend: start implementing aarch64 lemon2025-12-281-0/+4
|
* avoid GOT relocations in unnecessary instances lemon2025-12-251-1/+1
| | | | | Also change xcon to have a flagset for symbols (whether it's a function, locally defined; later: thread local, etc).
* c: add _Generic lemon2025-12-221-0/+53
|
* c: recognize __attribute__ as decltok, improve diagnostic for expected ↵ lemon2025-12-221-1/+2
| | | | declaration
* preprocessor make some errors just warnings lemon2025-12-221-4/+6
|
* c/c.c: cleanup exprparse a little lemon2025-12-221-13/+12
|
* c: Fix some dumb uses of initialized stuff lemon2025-12-222-10/+12
| | | | | | Can't figure out what's wrong with the change to struct expr from 9721d6ba40 but it makes valgrind complain and causes miscompilation of the compiler itself..
* c: keyword aliases lemon2025-12-213-66/+81
| | | | | Some linux headers use __signed__ for whatever reason.. this is a general fix for those alternate keyword
* c: allow `return voidfn()` extension lemon2025-12-211-4/+30
|
* lexer: more small optimizations lemon2025-12-211-14/+33
|
* lexer: note source of #include when error occurs in #included file lemon2025-12-202-1/+8
|
* c: small typechecking bugfixes lemon2025-12-201-3/+3
|