World Library  
Flag as Inappropriate
Email this Article

LCC (compiler)

Article Id: WHEBN0000740740
Reproduction Date:

Title: LCC (compiler)  
Author: World Heritage Encyclopedia
Language: English
Subject: ANSI C, Tiny C Compiler, C compilers, C++ compilers, C programming language
Collection: C Compilers
Publisher: World Heritage Encyclopedia
Publication
Date:
 

LCC (compiler)

LCC
Developer(s) Dave Hanson and Chris Fraser
Initial release 1994 (1994)
Stable release 4.2 / September 4, 2002 (2002-09-04)
Written in C
Operating system Cross-platform
Type Compiler
License LCC License[1]
Website Official LCC website

LCC ("Local C Compiler" or "Little C Compiler") is a small, retargetable compiler for the ANSI C programming language. Although its source code is available at no charge for personal use,[2] it is not open source or free software according to the usual definitions because products derived from LCC may not be sold.[1] It was developed by Chris Fraser and David Hanson.

Contents

  • LCC 1
  • Projects incorporating LCC 2
    • Quake 3 2.1
    • lcc-win 2.2
    • Pelles C 2.3
    • Mathworks 2.4
  • License 3
  • References 4
  • Bibliography 5

LCC

LCC is intended to be simple to understand and is well-documented; its design is described in Fraser and Hanson's book A Retargetable C Compiler: Design and Implementation. The book includes most of the source code for version 3.6 of the compiler, which was written as a literate program using noweb. As of July 2011 the current version of LCC is 4.2, but much of the book still applies to this version. The major change since the book was published is in the code-generator interface, which is described in a separate document.[3]

The source code for LCC is around 20,000 lines, which is much smaller than many major compilers.[4] The Tiny C Compiler is one of the few compilers smaller than LCC.

LCC can generate code for several processor architectures, including Alpha, SPARC, MIPS, and x86; there is also an LCC backend that generates Microsoft's Common Intermediate Language.[5]

Projects incorporating LCC

Quake 3

id Software's id Tech 3 engine relies on a modified version of LCC to compile the source code of each game module or third-party mod into bytecode targeting its virtual machine.[6] This means that modules are oblivious to the system beyond the system calls and limited file system scope offered by the engine, which is intended to reduce the threat posed by malicious mod authors. Another consideration is that games and mods written for the engine are portable without recompilation; only the virtual machine needs to be ported to new platforms in order to execute the modules.

lcc-win

lcc-win32 is an integrated development environment package for Microsoft Windows which includes a fork of LCC. An amd64 counterpart named lcc-win64 exists, which has been available since April 15, 2012.[7]

Pelles C

Pelles C's compiler is a heavily modified version of LCC providing C11 support, amd64 support, and additional optimisation techniques such as inline expansion.[8]

Mathworks

For 32-bit Windows machines, Lcc is used as a default if no other compiler is installed for Mathworks Matlab and related products.[9]

License

LCC is free for personal use and may be redistributed with attribution. LCC may not be sold for profit, but it may be included with other software that is sold for profit.[1]

References

  1. ^ a b c "LCC License". Retrieved 5 July 2011. 
  2. ^ "Official Github Repository". 
  3. ^ Fraser, Christopher W.; Hanson, David R. (July 2001). "The lcc 4.x Code-Generation Interface" (PDF). Microsoft Research. Technical Report MSR-TR-2001-64. Retrieved 5 July 2011. 
  4. ^ Sao-Jie Chen, Guang-Huei Lin, Pao-Ann Hsiung, Yu-Hen Hu. "Hardware software co-design of a multimedia SOC platform". Section 5.6.1: LCC Compiler Infrastructure. [1]
  5. ^ Hanson, David R. (March 2004). "Lcc.NET: Targeting the .NET Common Intermediate Language from Standard C" (PDF). Microsoft Research. Retrieved 22 July 2012. 
  6. ^ "John Carmack's .plan file, 24 July, 1999". Archived from the original on 19 August 2012. 
  7. ^ lcc-win: A Compiler system for Windows
  8. ^ Pelles C Overview
  9. ^ "Build MEX-Files". Archived from the original on 14 September 2012. Retrieved 6 November 2013. 

Bibliography

  • Fraser, Christopher W.; Hanson, David R. (1995). A Retargetable C Compiler: Design and Implementation. Addison-Wesley.  
This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and USA.gov, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for USA.gov and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
 
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
 
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.
 


Copyright © World Library Foundation. All rights reserved. eBooks from Project Gutenberg are sponsored by the World Library Foundation,
a 501c(4) Member's Support Non-Profit Organization, and is NOT affiliated with any governmental agency or department.