在好例子网,分享、交流、成长!
您当前所在位置:首页C/C++ 开发实例C/C++语言基础 → 超小型的完整的C语言编译器(TinyCC)源码

超小型的完整的C语言编译器(TinyCC)源码

C/C++语言基础

下载此实例
  • 开发语言:C/C++
  • 实例大小:0.85M
  • 下载次数:16
  • 浏览次数:559
  • 发布时间:2021-10-25
  • 实例类别:C/C++语言基础
  • 发 布 人:u239
  • 文件格式:.gz
  • 所需积分:2

实例介绍

【实例简介】Tinycc 是一个超小型的完整的C语言编译器,它具有速度快、体积小、跨平台等特性。是个学习的好例子
【实例截图】

【核心代码】

tinycc-15e9b73

├── COPYING
├── Changelog
├── CodingStyle
├── Makefile
├── README
├── RELICENSING
├── TODO
├── USES
├── VERSION
├── arm-asm.c
├── arm-gen.c
├── arm-link.c
├── arm-tok.h
├── arm64-asm.c
├── arm64-gen.c
├── arm64-link.c
├── c67-gen.c
├── c67-link.c
├── coff.h
├── configure
├── conftest.c
├── elf.h
├── examples
│   ├── ex1.c
│   ├── ex2.c
│   ├── ex3.c
│   ├── ex4.c
│   └── ex5.c
├── i386-asm.c
├── i386-asm.h
├── i386-gen.c
├── i386-link.c
├── i386-tok.h
├── il-gen.c
├── il-opcodes.h
├── include
│   ├── float.h
│   ├── stdalign.h
│   ├── stdarg.h
│   ├── stdatomic.h
│   ├── stdbool.h
│   ├── stddef.h
│   ├── stdnoreturn.h
│   ├── tccdefs.h
│   ├── tgmath.h
│   └── varargs.h
├── lib
│   ├── Makefile
│   ├── alloca-bt.S
│   ├── alloca.S
│   ├── armeabi.c
│   ├── armflush.c
│   ├── bcheck.c
│   ├── bt-dll.c
│   ├── bt-exe.c
│   ├── bt-log.c
│   ├── dsohandle.c
│   ├── fetch_and_add.S
│   ├── lib-arm64.c
│   ├── libtcc1.c
│   ├── stdatomic.c
│   ├── tcov.c
│   └── va_list.c
├── libtcc.c
├── libtcc.h
├── riscv64-asm.c
├── riscv64-gen.c
├── riscv64-link.c
├── riscv64-tok.h
├── stab.def
├── stab.h
├── tcc-doc.texi
├── tcc.c
├── tcc.h
├── tccasm.c
├── tcccoff.c
├── tccelf.c
├── tccgen.c
├── tcclib.h
├── tccmacho.c
├── tccpe.c
├── tccpp.c
├── tccrun.c
├── tcctok.h
├── tcctools.c
├── tests
│   ├── 42test.h
│   ├── Makefile
│   ├── abitest.c
│   ├── arm-asm-testsuite.sh
│   ├── asm-c-connect-1.c
│   ├── asm-c-connect-2.c
│   ├── asmtest.S
│   ├── boundtest.c
│   ├── bug.c
│   ├── gcctestsuite.sh
│   ├── libtcc_test.c
│   ├── libtcc_test_mt.c
│   ├── pp
│   │   ├── 01.c
│   │   ├── 01.expect
│   │   ├── 02.c
│   │   ├── 02.expect
│   │   ├── 03.c
│   │   ├── 03.expect
│   │   ├── 04.c
│   │   ├── 04.expect
│   │   ├── 05.c
│   │   ├── 05.expect
│   │   ├── 06.c
│   │   ├── 06.expect
│   │   ├── 07.c
│   │   ├── 07.expect
│   │   ├── 08.c
│   │   ├── 08.expect
│   │   ├── 09.c
│   │   ├── 09.expect
│   │   ├── 10.c
│   │   ├── 10.expect
│   │   ├── 11.c
│   │   ├── 11.expect
│   │   ├── 12.S
│   │   ├── 12.expect
│   │   ├── 13.S
│   │   ├── 13.expect
│   │   ├── 14.c
│   │   ├── 14.expect
│   │   ├── 15.c
│   │   ├── 15.expect
│   │   ├── 16.c
│   │   ├── 16.expect
│   │   ├── 17.c
│   │   ├── 17.expect
│   │   ├── 18.c
│   │   ├── 18.expect
│   │   ├── 19.c
│   │   ├── 19.expect
│   │   ├── 20.c
│   │   ├── 20.expect
│   │   ├── 21.c
│   │   ├── 21.expect
│   │   ├── Makefile
│   │   ├── pp-counter.c
│   │   └── pp-counter.expect
│   ├── tcctest.c
│   ├── tcctest.h
│   ├── testfp.c
│   ├── tests2
│   │   ├── 00_assignment.c
│   │   ├── 00_assignment.expect
│   │   ├── 01_comment.c
│   │   ├── 01_comment.expect
│   │   ├── 02_printf.c
│   │   ├── 02_printf.expect
│   │   ├── 03_struct.c
│   │   ├── 03_struct.expect
│   │   ├── 04_for.c
│   │   ├── 04_for.expect
│   │   ├── 05_array.c
│   │   ├── 05_array.expect
│   │   ├── 06_case.c
│   │   ├── 06_case.expect
│   │   ├── 07_function.c
│   │   ├── 07_function.expect
│   │   ├── 08_while.c
│   │   ├── 08_while.expect
│   │   ├── 09_do_while.c
│   │   ├── 09_do_while.expect
│   │   ├── 100_c99array-decls.c
│   │   ├── 100_c99array-decls.expect
│   │   ├── 101_cleanup.c
│   │   ├── 101_cleanup.expect
│   │   ├── 102_alignas.c
│   │   ├── 102_alignas.expect
│   │   ├── 103_implicit_memmove.c
│   │   ├── 103_implicit_memmove.expect
│   │   ├── 104 _inline.c
│   │   ├── 104_inline.c
│   │   ├── 104_inline.expect
│   │   ├── 105_local_extern.c
│   │   ├── 105_local_extern.expect
│   │   ├── 106_versym.c
│   │   ├── 106_versym.expect
│   │   ├── 107_stack_safe.c
│   │   ├── 107_stack_safe.expect
│   │   ├── 108_constructor.c
│   │   ├── 108_constructor.expect
│   │   ├── 109_float_struct_calling.c
│   │   ├── 109_float_struct_calling.expect
│   │   ├── 10_pointer.c
│   │   ├── 10_pointer.expect
│   │   ├── 110_average.c
│   │   ├── 110_average.expect
│   │   ├── 111_conversion.c
│   │   ├── 111_conversion.expect
│   │   ├── 112_backtrace.c
│   │   ├── 112_backtrace.expect
│   │   ├── 113_btdll.c
│   │   ├── 113_btdll.expect
│   │   ├── 114_bound_signal.c
│   │   ├── 114_bound_signal.expect
│   │   ├── 115_bound_setjmp.c
│   │   ├── 115_bound_setjmp.expect
│   │   ├── 116_bound_setjmp2.c
│   │   ├── 116_bound_setjmp2.expect
│   │   ├── 117_builtins.c
│   │   ├── 117_builtins.expect
│   │   ├── 118_switch.c
│   │   ├── 118_switch.expect
│   │   ├── 119_random_stuff.c
│   │   ├── 119_random_stuff.expect
│   │   ├── 11_precedence.c
│   │   ├── 11_precedence.expect
│   │   ├── 120 _alias.c
│   │   ├── 120_alias.c
│   │   ├── 120_alias.expect
│   │   ├── 121_struct_return.c
│   │   ├── 121_struct_return.expect
│   │   ├── 122_vla_reuse.c
│   │   ├── 122_vla_reuse.expect
│   │   ├── 123_vla_bug.c
│   │   ├── 123_vla_bug.expect
│   │   ├── 124_atomic_counter.c
│   │   ├── 124_atomic_counter.expect
│   │   ├── 125_atomic_misc.c
│   │   ├── 125_atomic_misc.expect
│   │   ├── 12_hashdefine.c
│   │   ├── 12_hashdefine.expect
│   │   ├── 13_integer_literals.c
│   │   ├── 13_integer_literals.expect
│   │   ├── 14_if.c
│   │   ├── 14_if.expect
│   │   ├── 15_recursion.c
│   │   ├── 15_recursion.expect
│   │   ├── 16_nesting.c
│   │   ├── 16_nesting.expect
│   │   ├── 17_enum.c
│   │   ├── 17_enum.expect
│   │   ├── 18_include.c
│   │   ├── 18_include.expect
│   │   ├── 18_include.h
│   │   ├── 19_pointer_arithmetic.c
│   │   ├── 19_pointer_arithmetic.expect
│   │   ├── 20_pointer_comparison.c
│   │   ├── 20_pointer_comparison.expect
│   │   ├── 21_char_array.c
│   │   ├── 21_char_array.expect
│   │   ├── 22_floating_point.c
│   │   ├── 22_floating_point.expect
│   │   ├── 23_type_coercion.c
│   │   ├── 23_type_coercion.expect
│   │   ├── 24_math_library.c
│   │   ├── 24_math_library.expect
│   │   ├── 25_quicksort.c
│   │   ├── 25_quicksort.expect
│   │   ├── 26_character_constants.c
│   │   ├── 26_character_constants.expect
│   │   ├── 27_sizeof.c
│   │   ├── 27_sizeof.expect
│   │   ├── 28_strings.c
│   │   ├── 28_strings.expect
│   │   ├── 29_array_address.c
│   │   ├── 29_array_address.expect
│   │   ├── 30_hanoi.c
│   │   ├── 30_hanoi.expect
│   │   ├── 31_args.c
│   │   ├── 31_args.expect
│   │   ├── 32_led.c
│   │   ├── 32_led.expect
│   │   ├── 33_ternary_op.c
│   │   ├── 33_ternary_op.expect
│   │   ├── 34_array_assignment.c
│   │   ├── 34_array_assignment.expect
│   │   ├── 35_sizeof.c
│   │   ├── 35_sizeof.expect
│   │   ├── 36_array_initialisers.c
│   │   ├── 36_array_initialisers.expect
│   │   ├── 37_sprintf.c
│   │   ├── 37_sprintf.expect
│   │   ├── 38_multiple_array_index.c
│   │   ├── 38_multiple_array_index.expect
│   │   ├── 39_typedef.c
│   │   ├── 39_typedef.expect
│   │   ├── 40_stdio.c
│   │   ├── 40_stdio.expect
│   │   ├── 41_hashif.c
│   │   ├── 41_hashif.expect
│   │   ├── 42_function_pointer.c
│   │   ├── 42_function_pointer.expect
│   │   ├── 43_void_param.c
│   │   ├── 43_void_param.expect
│   │   ├── 44_scoped_declarations.c
│   │   ├── 44_scoped_declarations.expect
│   │   ├── 45_empty_for.c
│   │   ├── 45_empty_for.expect
│   │   ├── 46_grep.c
│   │   ├── 46_grep.expect
│   │   ├── 47_switch_return.c
│   │   ├── 47_switch_return.expect
│   │   ├── 48_nested_break.c
│   │   ├── 48_nested_break.expect
│   │   ├── 49_bracket_evaluation.c
│   │   ├── 49_bracket_evaluation.expect
│   │   ├── 50_logical_second_arg.c
│   │   ├── 50_logical_second_arg.expect
│   │   ├── 51_static.c
│   │   ├── 51_static.expect
│   │   ├── 52_unnamed_enum.c
│   │   ├── 52_unnamed_enum.expect
│   │   ├── 54_goto.c
│   │   ├── 54_goto.expect
│   │   ├── 55_lshift_type.c
│   │   ├── 55_lshift_type.expect
│   │   ├── 60_errors_and_warnings.c
│   │   ├── 60_errors_and_warnings.expect
│   │   ├── 61_integers.c
│   │   ├── 61_integers.expect
│   │   ├── 64_macro_nesting.c
│   │   ├── 64_macro_nesting.expect
│   │   ├── 67_macro_concat.c
│   │   ├── 67_macro_concat.expect
│   │   ├── 70_floating_point_literals.c
│   │   ├── 70_floating_point_literals.expect
│   │   ├── 71_macro_empty_arg.c
│   │   ├── 71_macro_empty_arg.expect
│   │   ├── 72_long_long_constant.c
│   │   ├── 72_long_long_constant.expect
│   │   ├── 73_arm64.c
│   │   ├── 73_arm64.expect
│   │   ├── 75_array_in_struct_init.c
│   │   ├── 75_array_in_struct_init.expect
│   │   ├── 76_dollars_in_identifiers.c
│   │   ├── 76_dollars_in_identifiers.expect
│   │   ├── 77_push_pop_macro.c
│   │   ├── 77_push_pop_macro.expect
│   │   ├── 78_vla_label.c
│   │   ├── 78_vla_label.expect
│   │   ├── 79_vla_continue.c
│   │   ├── 79_vla_continue.expect
│   │   ├── 80_flexarray.c
│   │   ├── 80_flexarray.expect
│   │   ├── 81_types.c
│   │   ├── 81_types.expect
│   │   ├── 82_attribs_position.c
│   │   ├── 82_attribs_position.expect
│   │   ├── 83_utf8_in_identifiers.c
│   │   ├── 83_utf8_in_identifiers.expect
│   │   ├── 84_hex-float.c
│   │   ├── 84_hex-float.expect
│   │   ├── 85_asm-outside-function.c
│   │   ├── 85_asm-outside-function.expect
│   │   ├── 86_memory-model.c
│   │   ├── 86_memory-model.expect
│   │   ├── 87_dead_code.c
│   │   ├── 87_dead_code.expect
│   │   ├── 88_codeopt.c
│   │   ├── 88_codeopt.expect
│   │   ├── 89_nocode_wanted.c
│   │   ├── 89_nocode_wanted.expect
│   │   ├── 90_struct-init.c
│   │   ├── 90_struct-init.expect
│   │   ├── 91_ptr_longlong_arith32.c
│   │   ├── 91_ptr_longlong_arith32.expect
│   │   ├── 92_enum_bitfield.c
│   │   ├── 92_enum_bitfield.expect
│   │   ├── 93_integer_promotion.c
│   │   ├── 93_integer_promotion.expect
│   │   ├── 94_generic.c
│   │   ├── 94_generic.expect
│   │   ├── 95_bitfields.c
│   │   ├── 95_bitfields.expect
│   │   ├── 95_bitfields_ms.c
│   │   ├── 95_bitfields_ms.expect
│   │   ├── 96_nodata_wanted.c
│   │   ├── 96_nodata_wanted.expect
│   │   ├── 97_utf8_string_literal.c
│   │   ├── 97_utf8_string_literal.expect
│   │   ├── 98_al_ax_extend.c
│   │   ├── 98_al_ax_extend.expect
│   │   ├── 99_fastcall.c
│   │   ├── 99_fastcall.expect
│   │   ├── LICENSE
│   │   └── Makefile
│   └── vla_test.c
├── texi2pod.pl
├── win32
│   ├── build-tcc.bat
│   ├── examples
│   │   ├── dll.c
│   │   ├── fib.c
│   │   ├── hello_dll.c
│   │   └── hello_win.c
│   ├── include
│   │   ├── _mingw.h
│   │   ├── assert.h
│   │   ├── conio.h
│   │   ├── ctype.h
│   │   ├── dir.h
│   │   ├── direct.h
│   │   ├── dirent.h
│   │   ├── dos.h
│   │   ├── errno.h
│   │   ├── excpt.h
│   │   ├── fcntl.h
│   │   ├── fenv.h
│   │   ├── inttypes.h
│   │   ├── io.h
│   │   ├── iso646.h
│   │   ├── limits.h
│   │   ├── locale.h
│   │   ├── malloc.h
│   │   ├── math.h
│   │   ├── mem.h
│   │   ├── memory.h
│   │   ├── process.h
│   │   ├── sec_api
│   │   │   ├── conio_s.h
│   │   │   ├── crtdbg_s.h
│   │   │   ├── io_s.h
│   │   │   ├── mbstring_s.h
│   │   │   ├── search_s.h
│   │   │   ├── stdio_s.h
│   │   │   ├── stdlib_s.h
│   │   │   ├── stralign_s.h
│   │   │   ├── string_s.h
│   │   │   ├── sys
│   │   │   │   └── timeb_s.h
│   │   │   ├── tchar_s.h
│   │   │   ├── time_s.h
│   │   │   └── wchar_s.h
│   │   ├── setjmp.h
│   │   ├── share.h
│   │   ├── signal.h
│   │   ├── stdint.h
│   │   ├── stdio.h
│   │   ├── stdlib.h
│   │   ├── string.h
│   │   ├── sys
│   │   │   ├── fcntl.h
│   │   │   ├── file.h
│   │   │   ├── locking.h
│   │   │   ├── stat.h
│   │   │   ├── time.h
│   │   │   ├── timeb.h
│   │   │   ├── types.h
│   │   │   ├── unistd.h
│   │   │   └── utime.h
│   │   ├── tcc
│   │   │   └── tcc_libm.h
│   │   ├── tchar.h
│   │   ├── time.h
│   │   ├── uchar.h
│   │   ├── vadefs.h
│   │   ├── values.h
│   │   ├── wchar.h
│   │   ├── wctype.h
│   │   └── winapi
│   │       ├── basetsd.h
│   │       ├── basetyps.h
│   │       ├── guiddef.h
│   │       ├── poppack.h
│   │       ├── pshpack1.h
│   │       ├── pshpack2.h
│   │       ├── pshpack4.h
│   │       ├── pshpack8.h
│   │       ├── qos.h
│   │       ├── winbase.h
│   │       ├── wincon.h
│   │       ├── windef.h
│   │       ├── windows.h
│   │       ├── winerror.h
│   │       ├── wingdi.h
│   │       ├── winnls.h
│   │       ├── winnt.h
│   │       ├── winreg.h
│   │       ├── winsock2.h
│   │       ├── winuser.h
│   │       ├── winver.h
│   │       ├── ws2ipdef.h
│   │       └── ws2tcpip.h
│   ├── lib
│   │   ├── chkstk.S
│   │   ├── crt1.c
│   │   ├── crt1w.c
│   │   ├── crtinit.c
│   │   ├── dllcrt1.c
│   │   ├── dllmain.c
│   │   ├── gdi32.def
│   │   ├── kernel32.def
│   │   ├── msvcrt.def
│   │   ├── user32.def
│   │   ├── wincrt1.c
│   │   ├── wincrt1w.c
│   │   └── ws2_32.def
│   └── tcc-win32.txt
├── x86_64-asm.h
├── x86_64-gen.c
└── x86_64-link.c

15 directories, 483 files


实例下载地址

超小型的完整的C语言编译器(TinyCC)源码

不能下载?内容有错? 点击这里报错 + 投诉 + 提问

好例子网口号:伸出你的我的手 — 分享

网友评论

发表评论

(您的评论需要经过审核才能显示)

查看所有0条评论>>

小贴士

感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。

  • 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
  • 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
  • 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
  • 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。

关于好例子网

本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明

;
报警