How do C/C++ compilers work?(C/C++ 编译器如何工作?)
问题描述
经过十多年的 C/C++ 编码,我注意到以下模式 - 非常优秀的程序员往往对编译器的内部有详细的了解.
After over a decade of C/C++ coding, I've noticed the following pattern - very good programmers tend to have detailed knowledge of the innards of the compiler.
我是一个相当优秀的程序员,我有一个特别的编译器迷信"集合,所以我想重新认识我的知识并从基础开始.
I'm a reasonably good programmer, and I have an ad-hoc collection of compiler "superstitions", so I'd like to reboot my knowledge and start from the basics.
谁能推荐在线资源或喜爱书籍的链接?我对 C/C++ 编译、优化、GCC 和 LLVM 特别感兴趣.
Can anyone recommend links to online resources or favorite books? I'm particularly interested in C/C++ compiling, optimization, GCC and LLVM.
推荐答案
从龙书入手....(更注重代码优化和代码生成)
Start with the dragon book....(stress more on code optimization and code generation)
继续为诸如 Decaf 或 Cool 之类的教育编程语言编写一个玩具编译器,您可以在前端使用解析器生成器(lex 和 yacc)(让生活更轻松并专注于更多 imp 的东西)....
Go onto write a toy compiler for an educational programming language like Decaf or Cool.., you may use parser generators (lex and yacc) for your front end(to make life easier and focus on more imp stuff)....
然后阅读 gcc 内部书以及浏览 gcc 源代码.
Then read gcc internals book along with browsing gcc source code.
这篇关于C/C++ 编译器如何工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:C/C++ 编译器如何工作?
				
        
 
            
        基础教程推荐
- 在 C++ 中计算滚动/移动平均值 2021-01-01
 - C++结构和函数声明。为什么它不能编译? 2022-11-07
 - 如何检查GTK+3.0中的小部件类型? 2022-11-30
 - 如何将 std::pair 的排序 std::list 转换为 std::map 2022-01-01
 - 如何通过C程序打开命令提示符Cmd 2022-12-09
 - 常量变量在标题中不起作用 2021-01-01
 - 这个宏可以转换成函数吗? 2022-01-01
 - 如何在 C++ 中初始化静态常量成员? 2022-01-01
 - 静态库、静态链接动态库和动态链接动态库的 .lib 文件里面是什么? 2021-01-01
 - 我有静态或动态 boost 库吗? 2021-01-01
 
    	
    	
    	
    	
    	
    	
    	
    	
						
						
						
						
						
				
				
				
				