aboutsummaryrefslogtreecommitdiffhomepage
path: root/c
Commit message (Collapse)AuthorAgeFilesLines
* c: switch stmt diagnostics lemon2025-12-121-8/+49
| | | | For duplicate cases, case value overflow
* lex: use pmap for macro lookup lemon2025-12-122-126/+70
| | | | To reduce hashmap code repetition. Also add pmap_del for this purpose
* rename arraylength macro -> countof lemon2025-12-113-51/+51
|
* c: accept C99 `[static N]` style array decls, changes to fn quals lemon2025-12-111-24/+45
| | | | | | Function parameters qualifiers don't matter outside of function definition. `int (const int)` should be compatible with `int(int)` etc. So no need to store them in the typedata.
* _Alignof and stuff lemon2025-12-111-11/+18
|
* c: use a look-up table for isdecltok() lemon2025-12-111-14/+18
|
* -trigraphs option lemon2025-12-111-3/+3
|
* c: optimize environment decl lookup lemon2025-12-111-6/+26
| | | | | Use a hashmap for the toplevel, optimizing for the common use case where the file-scope has many more declarations than local scopes do
* c: disallow mismatched nested extern decl, & more diagnostics lemon2025-12-111-17/+24
|
* c: support for noreturn, and decl parsing cleanup lemon2025-12-112-107/+115
|
* lex/expr(): cleanup lemon2025-12-111-29/+29
|
* c: expr2reloc() change sig to return addend lemon2025-12-111-15/+12
|
* lexer: properly add padding for cpppredefs lemon2025-12-101-2/+2
|
* c: fix static relocation for &sym[offset] lemon2025-12-101-7/+6
|
* c: fix compound assignment type conversions when types don't match lemon2025-12-101-2/+3
|
* lex: make some hashtables resizable lemon2025-12-091-29/+67
| | | | Was hiting the fixed limits trying to preprocess sqlite3amalgamation
* c: fix some static initialziers lemon2025-12-081-1/+3
|
* eval: &*x address constants lemon2025-12-081-0/+4
|
* c: fix more declaration parsing bugs lemon2025-12-081-7/+17
|
* add command-line predefined macros (-D, -U) lemon2025-12-061-4/+52
|
* eval: fix float cmps lemon2025-12-051-0/+2
|
* cpp: implement preprocessor expressions short circuiting behaviour lemon2025-12-031-17/+23
| | | | This only affects whether an error is given for something like `0 && 0/0` (it shouldn't)
* c: allow redeclaration with K&R and non K&R prototypes lemon2025-12-031-2/+10
|
* preprocessor: add #ifndef...#endif include guard optimization lemon2025-12-022-11/+30
|
* c: make tentative definitions work lemon2025-12-021-17/+34
|
* c: narrowing ints of different signedness... lemon2025-12-011-1/+1
|
* c: edgecase for redeclaration of implicit sized array lemon2025-12-011-1/+1
|
* c: fix some decl bugs and diagnostics lemon2025-11-301-18/+34
|
* lex: remove some hacks and optimize preprocessor lemon2025-11-281-39/+34
|
* c/type: make implicit const T* -> T* conversion warning, not error lemon2025-11-261-1/+8
|
* c: more static initializer fixes lemon2025-11-262-7/+9
|
* c: fix elided-braces initializers for nested unions lemon2025-11-261-5/+16
| | | | | | | | For example in ```c struct {int a; union { int b,c; }; int d; } X = {1,2,3}; ``` Fields `a`,`b`,`d` must get initialized to 1,2,3. Not `c`
* pp: fix token pasting (hopefully) lemon2025-11-241-27/+15
|
* c: fix condexprvalue lemon2025-11-241-54/+42
| | | | | The original implementation was broken when presented with nested short-circuiting logical operators.
* c: remove unused function lemon2025-11-241-8/+0
|
* c: create dummy unreachable block after trap lemon2025-11-242-5/+2
| | | | | | Reverts 9abe27f6712. This simplies expr codegen, otherwise would manually have to check `fn->curblk != NULL` repeatedly. Later passes will easily delete those unreachable blocks
* ir: implement cvtu64f. and other bug fixes lemon2025-11-231-1/+4
| | | | | compiler is bootstrapping?! however, stage1 and stage2+ executables aren't bit-identical.. small differences in the codegen.. need to look into that
* c: check actual reachability for non-void func may not return value lemon2025-11-231-2/+6
|
* c: implement compound initializer in static context lemon2025-11-231-2/+18
|
* lex: TEMP hack: #define __x86_64__ or some system headers break subtly lemon2025-11-231-0/+1
|
* c: fix runtime implicit-length array initializer lemon2025-11-231-2/+3
|
* c: __builtin_va_copy lemon2025-11-231-8/+21
|
* implement float varargs, and some other fixes lemon2025-11-231-0/+3
|
* cpp: fix bugs with recursive macro expansion (hopefully) lemon2025-11-232-28/+25
|
* cpp: fix ## bug lemon2025-11-231-1/+1
|
* c: fix precedence of conditional expression rhs lemon2025-11-221-2/+2
|
* c: make the warning for '()' function declarations less strict lemon2025-11-221-1/+1
|
* c: fix static eval for address of some array refs lemon2025-11-222-2/+7
|
* c: add decl.sym; avoid calling mkhiddensym repeatedly lemon2025-11-222-22/+17
|
* c: move warning for extension keyword til after preprocessor lemon2025-11-223-4/+12
|