languages.texi
来自「理解和实践操作系统的一本好书」· TEXI 代码 · 共 37 行
TEXI
37 行
@c Copyright (C) 2002 Free Software Foundation, Inc.@c This is part of the GCC manual.@c For copying conditions, see the file gcc.texi.@node Languages@chapter Language Front Ends in GCCThe interface to front ends for languages in GCC, and in particularthe @code{tree} structure (@pxref{Trees}), was initially designed forC, and many aspects of it are still somewhat biased towards C andC-like languages. It is, however, reasonably well suited to otherprocedural languages, and front ends for many such languages have beenwritten for GCC@.Writing a compiler as a front end for GCC, rather than compilingdirectly to assembler or generating C code which is then compiled byGCC, has several advantages:@itemize @bullet@item GCC front ends benefit from the support for many differenttarget machines already present in GCC@.@item GCC front ends benefit from all the optimizations in GCC@. Someof these, such as alias analysis, may work better when GCC iscompiling directly from source code then when it is compiling fromgenerated C code.@item Better debugging information is generated when compilingdirectly from source code than when going via intermediate generated Ccode.@end itemizeBecause of the advantages of writing a compiler as a GCC front end,GCC front ends have also been created for languages very differentfrom those for which GCC was designed, such as the declarativelogic/functional language Mercury. For these reasons, it may also beuseful to implement compilers created for specialized purposes (forexample, as part of a research project) as GCC front ends.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?