├── .gitignore ├── CMakeLists.txt ├── Makefile ├── README.md ├── compile.sh ├── config.def.h ├── include ├── linux │ ├── float.h │ ├── stdarg.h │ ├── stdbool.h │ └── stddef.h └── mingw │ ├── float.h │ ├── mm_malloc.h │ └── stdbool.h ├── run_tests_with_mingw_and_wine.sh ├── src ├── abi │ ├── abi.c │ ├── abi.h │ ├── microsoft.c │ └── sysv.c ├── arch │ ├── calling.c │ ├── calling.h │ ├── x64.c │ └── x64.h ├── arguments.c ├── arguments.h ├── assembler │ ├── assembler.c │ ├── assembler.h │ ├── encode.c │ ├── encode.h │ └── instructions.h ├── character_types.c ├── character_types.h ├── codegen │ ├── binary_operators.h │ ├── codegen.c │ ├── codegen.h │ ├── registers.c │ ├── registers.h │ ├── rodata.c │ └── rodata.h ├── common.c ├── common.h ├── debug.c ├── debug.h ├── escape_sequence.c ├── escape_sequence.h ├── ir │ ├── dominator_tree.c │ ├── dominator_tree.h │ ├── export_dot.c │ ├── export_dot.h │ ├── global_code_motion.c │ ├── global_code_motion.h │ ├── ir.c │ ├── ir.h │ ├── operators.c │ └── operators.h ├── linker │ ├── coff.c │ ├── coff.h │ ├── elf.c │ ├── elf.h │ ├── linker.c │ ├── linker.h │ ├── object.c │ └── object.h ├── main.c ├── optimize │ ├── mem2reg.c │ ├── mem2reg.h │ ├── peephole.c │ ├── peephole.h │ ├── remove_dead.c │ └── remove_dead.h ├── parser │ ├── declaration.c │ ├── declaration.h │ ├── expression.c │ ├── expression.h │ ├── expression_to_ir.c │ ├── expression_to_ir.h │ ├── function_parser.c │ ├── function_parser.h │ ├── parser.c │ ├── parser.h │ ├── symbols.c │ └── symbols.h ├── precedence.c ├── precedence.h ├── preprocessor │ ├── directives.c │ ├── directives.h │ ├── input.c │ ├── input.h │ ├── macro_expander.c │ ├── macro_expander.h │ ├── preprocessor.c │ ├── preprocessor.h │ ├── string_concat.c │ ├── string_concat.h │ ├── string_set.c │ ├── string_set.h │ ├── token_list.c │ ├── token_list.h │ ├── tokenizer.c │ ├── tokenizer.h │ └── tokens.h ├── string_view.c ├── string_view.h ├── types.c ├── types.h ├── utf8.c └── utf8.h └── tests ├── alignof.c ├── anonymous_struct.c ├── arr_size.c ├── array_decay.c ├── array_pass.c ├── assignment_operators.c ├── attribute_packed.c ├── bitfields.c ├── bool.c ├── byteswap.c ├── callback.c ├── calling.c ├── character_constants.c ├── comment.c ├── compound_literals.c ├── conditional.c ├── constant.c ├── crlf.c ├── digit_separator.c ├── elifdef.c ├── encoder.c ├── end_without_newline.c ├── eof_comment.c ├── eol_file.c ├── floating_point.c ├── function_returning_function_ptr.c ├── generic.c ├── goto.c ├── identifiers.c ├── include.c ├── initializers.c ├── integer_constants.c ├── integer_sizes.c ├── line.c ├── linking.c ├── main_zero.c ├── offsetof.c ├── operands.c ├── optimizer.c ├── pointer_arithmetic.c ├── pragma_once.c ├── pragma_once1.h ├── pragma_once2.h ├── pragma_push_macro.c ├── preprocess.c ├── rvalue_conversion.c ├── sequencing.c ├── should_fail ├── const_a.c ├── const_b.c ├── const_c.c ├── const_d.c ├── error.c ├── paramter_count_a.c ├── paramter_count_b.c ├── preprocessor_ub.c ├── register.c ├── vla.c └── wrong_arguments.c ├── sizeof.c ├── static_assert.c ├── static_func_pointer.c ├── static_strings.c ├── std_macros.c ├── stringify.c ├── switch.c ├── universal_character_name.c ├── unnamed_paramters.c ├── variadic_functions.c ├── variadic_macros.c ├── vla.c └── wchar.c /.gitignore: -------------------------------------------------------------------------------- 1 | bin/ 2 | obj/ 3 | musl/ 4 | config.h 5 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/CMakeLists.txt -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/Makefile -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/README.md -------------------------------------------------------------------------------- /compile.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/compile.sh -------------------------------------------------------------------------------- /config.def.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/config.def.h -------------------------------------------------------------------------------- /include/linux/float.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/include/linux/float.h -------------------------------------------------------------------------------- /include/linux/stdarg.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/include/linux/stdarg.h -------------------------------------------------------------------------------- /include/linux/stdbool.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/include/linux/stdbool.h -------------------------------------------------------------------------------- /include/linux/stddef.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/include/linux/stddef.h -------------------------------------------------------------------------------- /include/mingw/float.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/include/mingw/float.h -------------------------------------------------------------------------------- /include/mingw/mm_malloc.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/include/mingw/mm_malloc.h -------------------------------------------------------------------------------- /include/mingw/stdbool.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/include/mingw/stdbool.h -------------------------------------------------------------------------------- /run_tests_with_mingw_and_wine.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/run_tests_with_mingw_and_wine.sh -------------------------------------------------------------------------------- /src/abi/abi.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/abi/abi.c -------------------------------------------------------------------------------- /src/abi/abi.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/abi/abi.h -------------------------------------------------------------------------------- /src/abi/microsoft.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/abi/microsoft.c -------------------------------------------------------------------------------- /src/abi/sysv.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/abi/sysv.c -------------------------------------------------------------------------------- /src/arch/calling.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/arch/calling.c -------------------------------------------------------------------------------- /src/arch/calling.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/arch/calling.h -------------------------------------------------------------------------------- /src/arch/x64.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/arch/x64.c -------------------------------------------------------------------------------- /src/arch/x64.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/arch/x64.h -------------------------------------------------------------------------------- /src/arguments.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/arguments.c -------------------------------------------------------------------------------- /src/arguments.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/arguments.h -------------------------------------------------------------------------------- /src/assembler/assembler.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/assembler/assembler.c -------------------------------------------------------------------------------- /src/assembler/assembler.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/assembler/assembler.h -------------------------------------------------------------------------------- /src/assembler/encode.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/assembler/encode.c -------------------------------------------------------------------------------- /src/assembler/encode.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/assembler/encode.h -------------------------------------------------------------------------------- /src/assembler/instructions.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/assembler/instructions.h -------------------------------------------------------------------------------- /src/character_types.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/character_types.c -------------------------------------------------------------------------------- /src/character_types.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/character_types.h -------------------------------------------------------------------------------- /src/codegen/binary_operators.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/codegen/binary_operators.h -------------------------------------------------------------------------------- /src/codegen/codegen.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/codegen/codegen.c -------------------------------------------------------------------------------- /src/codegen/codegen.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/codegen/codegen.h -------------------------------------------------------------------------------- /src/codegen/registers.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/codegen/registers.c -------------------------------------------------------------------------------- /src/codegen/registers.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/codegen/registers.h -------------------------------------------------------------------------------- /src/codegen/rodata.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/codegen/rodata.c -------------------------------------------------------------------------------- /src/codegen/rodata.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/codegen/rodata.h -------------------------------------------------------------------------------- /src/common.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/common.c -------------------------------------------------------------------------------- /src/common.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/common.h -------------------------------------------------------------------------------- /src/debug.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/debug.c -------------------------------------------------------------------------------- /src/debug.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/debug.h -------------------------------------------------------------------------------- /src/escape_sequence.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/escape_sequence.c -------------------------------------------------------------------------------- /src/escape_sequence.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/escape_sequence.h -------------------------------------------------------------------------------- /src/ir/dominator_tree.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/ir/dominator_tree.c -------------------------------------------------------------------------------- /src/ir/dominator_tree.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/ir/dominator_tree.h -------------------------------------------------------------------------------- /src/ir/export_dot.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/ir/export_dot.c -------------------------------------------------------------------------------- /src/ir/export_dot.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/ir/export_dot.h -------------------------------------------------------------------------------- /src/ir/global_code_motion.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/ir/global_code_motion.c -------------------------------------------------------------------------------- /src/ir/global_code_motion.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/ir/global_code_motion.h -------------------------------------------------------------------------------- /src/ir/ir.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/ir/ir.c -------------------------------------------------------------------------------- /src/ir/ir.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/ir/ir.h -------------------------------------------------------------------------------- /src/ir/operators.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/ir/operators.c -------------------------------------------------------------------------------- /src/ir/operators.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/ir/operators.h -------------------------------------------------------------------------------- /src/linker/coff.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/linker/coff.c -------------------------------------------------------------------------------- /src/linker/coff.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/linker/coff.h -------------------------------------------------------------------------------- /src/linker/elf.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/linker/elf.c -------------------------------------------------------------------------------- /src/linker/elf.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/linker/elf.h -------------------------------------------------------------------------------- /src/linker/linker.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/linker/linker.c -------------------------------------------------------------------------------- /src/linker/linker.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/linker/linker.h -------------------------------------------------------------------------------- /src/linker/object.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/linker/object.c -------------------------------------------------------------------------------- /src/linker/object.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/linker/object.h -------------------------------------------------------------------------------- /src/main.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/main.c -------------------------------------------------------------------------------- /src/optimize/mem2reg.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/optimize/mem2reg.c -------------------------------------------------------------------------------- /src/optimize/mem2reg.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/optimize/mem2reg.h -------------------------------------------------------------------------------- /src/optimize/peephole.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/optimize/peephole.c -------------------------------------------------------------------------------- /src/optimize/peephole.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/optimize/peephole.h -------------------------------------------------------------------------------- /src/optimize/remove_dead.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/optimize/remove_dead.c -------------------------------------------------------------------------------- /src/optimize/remove_dead.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/optimize/remove_dead.h -------------------------------------------------------------------------------- /src/parser/declaration.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/parser/declaration.c -------------------------------------------------------------------------------- /src/parser/declaration.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/parser/declaration.h -------------------------------------------------------------------------------- /src/parser/expression.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/parser/expression.c -------------------------------------------------------------------------------- /src/parser/expression.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/parser/expression.h -------------------------------------------------------------------------------- /src/parser/expression_to_ir.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/parser/expression_to_ir.c -------------------------------------------------------------------------------- /src/parser/expression_to_ir.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/parser/expression_to_ir.h -------------------------------------------------------------------------------- /src/parser/function_parser.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/parser/function_parser.c -------------------------------------------------------------------------------- /src/parser/function_parser.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/parser/function_parser.h -------------------------------------------------------------------------------- /src/parser/parser.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/parser/parser.c -------------------------------------------------------------------------------- /src/parser/parser.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/parser/parser.h -------------------------------------------------------------------------------- /src/parser/symbols.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/parser/symbols.c -------------------------------------------------------------------------------- /src/parser/symbols.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/parser/symbols.h -------------------------------------------------------------------------------- /src/precedence.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/precedence.c -------------------------------------------------------------------------------- /src/precedence.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/precedence.h -------------------------------------------------------------------------------- /src/preprocessor/directives.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/preprocessor/directives.c -------------------------------------------------------------------------------- /src/preprocessor/directives.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/preprocessor/directives.h -------------------------------------------------------------------------------- /src/preprocessor/input.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/preprocessor/input.c -------------------------------------------------------------------------------- /src/preprocessor/input.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/preprocessor/input.h -------------------------------------------------------------------------------- /src/preprocessor/macro_expander.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/preprocessor/macro_expander.c -------------------------------------------------------------------------------- /src/preprocessor/macro_expander.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/preprocessor/macro_expander.h -------------------------------------------------------------------------------- /src/preprocessor/preprocessor.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/preprocessor/preprocessor.c -------------------------------------------------------------------------------- /src/preprocessor/preprocessor.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/preprocessor/preprocessor.h -------------------------------------------------------------------------------- /src/preprocessor/string_concat.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/preprocessor/string_concat.c -------------------------------------------------------------------------------- /src/preprocessor/string_concat.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/preprocessor/string_concat.h -------------------------------------------------------------------------------- /src/preprocessor/string_set.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/preprocessor/string_set.c -------------------------------------------------------------------------------- /src/preprocessor/string_set.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/preprocessor/string_set.h -------------------------------------------------------------------------------- /src/preprocessor/token_list.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/preprocessor/token_list.c -------------------------------------------------------------------------------- /src/preprocessor/token_list.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/preprocessor/token_list.h -------------------------------------------------------------------------------- /src/preprocessor/tokenizer.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/preprocessor/tokenizer.c -------------------------------------------------------------------------------- /src/preprocessor/tokenizer.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/preprocessor/tokenizer.h -------------------------------------------------------------------------------- /src/preprocessor/tokens.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/preprocessor/tokens.h -------------------------------------------------------------------------------- /src/string_view.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/string_view.c -------------------------------------------------------------------------------- /src/string_view.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/string_view.h -------------------------------------------------------------------------------- /src/types.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/types.c -------------------------------------------------------------------------------- /src/types.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/types.h -------------------------------------------------------------------------------- /src/utf8.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/utf8.c -------------------------------------------------------------------------------- /src/utf8.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/src/utf8.h -------------------------------------------------------------------------------- /tests/alignof.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/tests/alignof.c -------------------------------------------------------------------------------- /tests/anonymous_struct.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/tests/anonymous_struct.c -------------------------------------------------------------------------------- /tests/arr_size.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/tests/arr_size.c -------------------------------------------------------------------------------- /tests/array_decay.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/tests/array_decay.c -------------------------------------------------------------------------------- /tests/array_pass.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/tests/array_pass.c -------------------------------------------------------------------------------- /tests/assignment_operators.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/tests/assignment_operators.c -------------------------------------------------------------------------------- /tests/attribute_packed.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/tests/attribute_packed.c -------------------------------------------------------------------------------- /tests/bitfields.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/tests/bitfields.c -------------------------------------------------------------------------------- /tests/bool.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/tests/bool.c -------------------------------------------------------------------------------- /tests/byteswap.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/tests/byteswap.c -------------------------------------------------------------------------------- /tests/callback.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/tests/callback.c -------------------------------------------------------------------------------- /tests/calling.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/tests/calling.c -------------------------------------------------------------------------------- /tests/character_constants.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/tests/character_constants.c -------------------------------------------------------------------------------- /tests/comment.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/tests/comment.c -------------------------------------------------------------------------------- /tests/compound_literals.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/tests/compound_literals.c -------------------------------------------------------------------------------- /tests/conditional.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/tests/conditional.c -------------------------------------------------------------------------------- /tests/constant.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/tests/constant.c -------------------------------------------------------------------------------- /tests/crlf.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/tests/crlf.c -------------------------------------------------------------------------------- /tests/digit_separator.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/tests/digit_separator.c -------------------------------------------------------------------------------- /tests/elifdef.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/tests/elifdef.c -------------------------------------------------------------------------------- /tests/encoder.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/tests/encoder.c -------------------------------------------------------------------------------- /tests/end_without_newline.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/tests/end_without_newline.c -------------------------------------------------------------------------------- /tests/eof_comment.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/tests/eof_comment.c -------------------------------------------------------------------------------- /tests/eol_file.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/tests/eol_file.c -------------------------------------------------------------------------------- /tests/floating_point.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/tests/floating_point.c -------------------------------------------------------------------------------- /tests/function_returning_function_ptr.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/tests/function_returning_function_ptr.c -------------------------------------------------------------------------------- /tests/generic.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/tests/generic.c -------------------------------------------------------------------------------- /tests/goto.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/tests/goto.c -------------------------------------------------------------------------------- /tests/identifiers.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/tests/identifiers.c -------------------------------------------------------------------------------- /tests/include.c: -------------------------------------------------------------------------------- 1 | #define C "pragma_once1.h" 2 | #include C 3 | 4 | int main(void) { 5 | func_A(); 6 | } 7 | -------------------------------------------------------------------------------- /tests/initializers.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/tests/initializers.c -------------------------------------------------------------------------------- /tests/integer_constants.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/tests/integer_constants.c -------------------------------------------------------------------------------- /tests/integer_sizes.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/tests/integer_sizes.c -------------------------------------------------------------------------------- /tests/line.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/tests/line.c -------------------------------------------------------------------------------- /tests/linking.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/tests/linking.c -------------------------------------------------------------------------------- /tests/main_zero.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/tests/main_zero.c -------------------------------------------------------------------------------- /tests/offsetof.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/tests/offsetof.c -------------------------------------------------------------------------------- /tests/operands.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/tests/operands.c -------------------------------------------------------------------------------- /tests/optimizer.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/tests/optimizer.c -------------------------------------------------------------------------------- /tests/pointer_arithmetic.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/tests/pointer_arithmetic.c -------------------------------------------------------------------------------- /tests/pragma_once.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/tests/pragma_once.c -------------------------------------------------------------------------------- /tests/pragma_once1.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | void func_A() { 4 | } 5 | -------------------------------------------------------------------------------- /tests/pragma_once2.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | void func_B() { 4 | } 5 | -------------------------------------------------------------------------------- /tests/pragma_push_macro.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/tests/pragma_push_macro.c -------------------------------------------------------------------------------- /tests/preprocess.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/tests/preprocess.c -------------------------------------------------------------------------------- /tests/rvalue_conversion.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/tests/rvalue_conversion.c -------------------------------------------------------------------------------- /tests/sequencing.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/tests/sequencing.c -------------------------------------------------------------------------------- /tests/should_fail/const_a.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/tests/should_fail/const_a.c -------------------------------------------------------------------------------- /tests/should_fail/const_b.c: -------------------------------------------------------------------------------- 1 | int main(void) { 2 | int * const b = 0; 3 | b += 1; 4 | } 5 | -------------------------------------------------------------------------------- /tests/should_fail/const_c.c: -------------------------------------------------------------------------------- 1 | int main(void) { 2 | int arr[const 5]; 3 | } 4 | -------------------------------------------------------------------------------- /tests/should_fail/const_d.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/tests/should_fail/const_d.c -------------------------------------------------------------------------------- /tests/should_fail/error.c: -------------------------------------------------------------------------------- 1 | #error 2 | 3 | int main(void) { 4 | } 5 | -------------------------------------------------------------------------------- /tests/should_fail/paramter_count_a.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/tests/should_fail/paramter_count_a.c -------------------------------------------------------------------------------- /tests/should_fail/paramter_count_b.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/tests/should_fail/paramter_count_b.c -------------------------------------------------------------------------------- /tests/should_fail/preprocessor_ub.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/tests/should_fail/preprocessor_ub.c -------------------------------------------------------------------------------- /tests/should_fail/register.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/tests/should_fail/register.c -------------------------------------------------------------------------------- /tests/should_fail/vla.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/tests/should_fail/vla.c -------------------------------------------------------------------------------- /tests/should_fail/wrong_arguments.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/tests/should_fail/wrong_arguments.c -------------------------------------------------------------------------------- /tests/sizeof.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/tests/sizeof.c -------------------------------------------------------------------------------- /tests/static_assert.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/tests/static_assert.c -------------------------------------------------------------------------------- /tests/static_func_pointer.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/tests/static_func_pointer.c -------------------------------------------------------------------------------- /tests/static_strings.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/tests/static_strings.c -------------------------------------------------------------------------------- /tests/std_macros.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/tests/std_macros.c -------------------------------------------------------------------------------- /tests/stringify.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/tests/stringify.c -------------------------------------------------------------------------------- /tests/switch.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/tests/switch.c -------------------------------------------------------------------------------- /tests/universal_character_name.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/tests/universal_character_name.c -------------------------------------------------------------------------------- /tests/unnamed_paramters.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/tests/unnamed_paramters.c -------------------------------------------------------------------------------- /tests/variadic_functions.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/tests/variadic_functions.c -------------------------------------------------------------------------------- /tests/variadic_macros.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/tests/variadic_macros.c -------------------------------------------------------------------------------- /tests/vla.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/tests/vla.c -------------------------------------------------------------------------------- /tests/wchar.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lasarus/C-Compiler/HEAD/tests/wchar.c --------------------------------------------------------------------------------