xref: /openbsd-src/gnu/llvm/clang/www/features.html (revision ec727ea710c91afd8ce4f788c5aaa8482b7b69b2)
1e5dd7070Spatrick<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
2e5dd7070Spatrick          "http://www.w3.org/TR/html4/strict.dtd">
3e5dd7070Spatrick<html>
4e5dd7070Spatrick<head>
5e5dd7070Spatrick  <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
6e5dd7070Spatrick  <title>Clang - Features and Goals</title>
7e5dd7070Spatrick  <link type="text/css" rel="stylesheet" href="menu.css">
8e5dd7070Spatrick  <link type="text/css" rel="stylesheet" href="content.css">
9e5dd7070Spatrick  <style type="text/css">
10e5dd7070Spatrick</style>
11e5dd7070Spatrick</head>
12e5dd7070Spatrick<body>
13e5dd7070Spatrick
14e5dd7070Spatrick<!--#include virtual="menu.html.incl"-->
15e5dd7070Spatrick
16e5dd7070Spatrick<div id="content">
17e5dd7070Spatrick
18e5dd7070Spatrick<!--*************************************************************************-->
19e5dd7070Spatrick<h1>Clang - Features and Goals</h1>
20e5dd7070Spatrick<!--*************************************************************************-->
21e5dd7070Spatrick
22e5dd7070Spatrick<p>
23e5dd7070SpatrickThis page describes the <a href="index.html#goals">features and goals</a> of
24e5dd7070SpatrickClang in more detail and gives a more broad explanation about what we mean.
25e5dd7070SpatrickThese features are:
26e5dd7070Spatrick</p>
27e5dd7070Spatrick
28e5dd7070Spatrick<p>End-User Features:</p>
29e5dd7070Spatrick
30e5dd7070Spatrick<ul>
31e5dd7070Spatrick<li><a href="#performance">Fast compiles and low memory use</a></li>
32e5dd7070Spatrick<li><a href="#expressivediags">Expressive diagnostics</a></li>
33e5dd7070Spatrick<li><a href="#gcccompat">GCC compatibility</a></li>
34e5dd7070Spatrick</ul>
35e5dd7070Spatrick
36e5dd7070Spatrick<p>Utility and Applications:</p>
37e5dd7070Spatrick
38e5dd7070Spatrick<ul>
39e5dd7070Spatrick<li><a href="#libraryarch">Library based architecture</a></li>
40e5dd7070Spatrick<li><a href="#diverseclients">Support diverse clients</a></li>
41e5dd7070Spatrick<li><a href="#ideintegration">Integration with IDEs</a></li>
42e5dd7070Spatrick<li><a href="#license">Use the LLVM 'BSD' License</a></li>
43e5dd7070Spatrick</ul>
44e5dd7070Spatrick
45e5dd7070Spatrick<p>Internal Design and Implementation:</p>
46e5dd7070Spatrick
47e5dd7070Spatrick<ul>
48e5dd7070Spatrick<li><a href="#real">A real-world, production quality compiler</a></li>
49e5dd7070Spatrick<li><a href="#simplecode">A simple and hackable code base</a></li>
50e5dd7070Spatrick<li><a href="#unifiedparser">A single unified parser for C, Objective C, C++,
51e5dd7070Spatrick    and Objective C++</a></li>
52e5dd7070Spatrick<li><a href="#conformance">Conformance with C/C++/ObjC and their
53e5dd7070Spatrick    variants</a></li>
54e5dd7070Spatrick</ul>
55e5dd7070Spatrick
56e5dd7070Spatrick<!--*************************************************************************-->
57e5dd7070Spatrick<h2><a name="enduser">End-User Features</a></h2>
58e5dd7070Spatrick<!--*************************************************************************-->
59e5dd7070Spatrick
60e5dd7070Spatrick
61e5dd7070Spatrick<!--=======================================================================-->
62e5dd7070Spatrick<h3><a name="performance">Fast compiles and Low Memory Use</a></h3>
63e5dd7070Spatrick<!--=======================================================================-->
64e5dd7070Spatrick
65e5dd7070Spatrick<p>A major focus of our work on clang is to make it fast, light and scalable.
66e5dd7070SpatrickThe library-based architecture of clang makes it straight-forward to time and
67e5dd7070Spatrickprofile the cost of each layer of the stack, and the driver has a number of
68e5dd7070Spatrickoptions for performance analysis. Many detailed benchmarks can be found online.</p>
69e5dd7070Spatrick
70e5dd7070Spatrick<p>Compile time performance is important, but when using clang as an API, often
71e5dd7070Spatrickmemory use is even more so: the less memory the code takes the more code you can
72e5dd7070Spatrickfit into memory at a time (useful for whole program analysis tools, for
73e5dd7070Spatrickexample).</p>
74e5dd7070Spatrick
75e5dd7070Spatrick<p>In addition to being efficient when pitted head-to-head against GCC in batch
76e5dd7070Spatrickmode, clang is built with a <a href="#libraryarch">library based
77e5dd7070Spatrickarchitecture</a> that makes it relatively easy to adapt it and build new tools
78e5dd7070Spatrickwith it.  This means that it is often possible to apply out-of-the-box thinking
79e5dd7070Spatrickand novel techniques to improve compilation in various ways.</p>
80e5dd7070Spatrick
81e5dd7070Spatrick
82e5dd7070Spatrick<!--=======================================================================-->
83e5dd7070Spatrick<h3><a name="expressivediags">Expressive Diagnostics</a></h3>
84e5dd7070Spatrick<!--=======================================================================-->
85e5dd7070Spatrick
86e5dd7070Spatrick<p>In addition to being fast and functional, we aim to make Clang extremely user
87e5dd7070Spatrickfriendly.  As far as a command-line compiler goes, this basically boils down to
88e5dd7070Spatrickmaking the diagnostics (error and warning messages) generated by the compiler
89e5dd7070Spatrickbe as useful as possible.  There are several ways that we do this, but the
90e5dd7070Spatrickmost important are pinpointing exactly what is wrong in the program,
91e5dd7070Spatrickhighlighting related information so that it is easy to understand at a glance,
92e5dd7070Spatrickand making the wording as clear as possible.</p>
93e5dd7070Spatrick
94e5dd7070Spatrick<p>Here is one simple example that illustrates the quality of Clang diagnostic:</p>
95e5dd7070Spatrick
96e5dd7070Spatrick<pre>
97e5dd7070Spatrick  $ <b>clang -fsyntax-only t.c</b>
98e5dd7070Spatrick  t.c:7:39: error: invalid operands to binary expression ('int' and 'struct A')
99e5dd7070Spatrick  <span style="color:darkgreen">  return y + func(y ? ((SomeA.X + 40) + SomeA) / 42 + SomeA.X : SomeA.X);</span>
100e5dd7070Spatrick  <span style="color:blue">                       ~~~~~~~~~~~~~~ ^ ~~~~~</span>
101e5dd7070Spatrick</pre>
102e5dd7070Spatrick
103e5dd7070Spatrick<p>Here you can see that you don't even need to see the original source code to
104e5dd7070Spatrickunderstand what is wrong based on the Clang error: Because Clang prints a
105e5dd7070Spatrickcaret, you know exactly <em>which</em> plus it is complaining about.  The range
106e5dd7070Spatrickinformation highlights the left and right side of the plus which makes it
107e5dd7070Spatrickimmediately obvious what the compiler is talking about, which is very useful for
108e5dd7070Spatrickcases involving precedence issues and many other situations.</p>
109e5dd7070Spatrick
110e5dd7070Spatrick<p>Clang diagnostics are very polished and have many features.  For more
111e5dd7070Spatrickinformation and examples, please see the <a href="diagnostics.html">Expressive
112e5dd7070SpatrickDiagnostics</a> page.</p>
113e5dd7070Spatrick
114e5dd7070Spatrick<!--=======================================================================-->
115e5dd7070Spatrick<h3><a name="gcccompat">GCC Compatibility</a></h3>
116e5dd7070Spatrick<!--=======================================================================-->
117e5dd7070Spatrick
118e5dd7070Spatrick<p>GCC is currently the defacto-standard open source compiler today, and it
119e5dd7070Spatrickroutinely compiles a huge volume of code. GCC supports a huge number of
120e5dd7070Spatrickextensions and features (many of which are undocumented) and a lot of
121e5dd7070Spatrickcode and header files depend on these features in order to build.</p>
122e5dd7070Spatrick
123e5dd7070Spatrick<p>While it would be nice to be able to ignore these extensions and focus on
124e5dd7070Spatrickimplementing the language standards to the letter, pragmatics force us to
125e5dd7070Spatricksupport the GCC extensions that see the most use.  Many users just want their
126e5dd7070Spatrickcode to compile, they don't care to argue about whether it is pedantically C99
127e5dd7070Spatrickor not.</p>
128e5dd7070Spatrick
129e5dd7070Spatrick<p>As mentioned above, all
130e5dd7070Spatrickextensions are explicitly recognized as such and marked with extension
131e5dd7070Spatrickdiagnostics, which can be mapped to warnings, errors, or just ignored.
132e5dd7070Spatrick</p>
133e5dd7070Spatrick
134e5dd7070Spatrick
135e5dd7070Spatrick<!--*************************************************************************-->
136e5dd7070Spatrick<h2><a name="applications">Utility and Applications</a></h2>
137e5dd7070Spatrick<!--*************************************************************************-->
138e5dd7070Spatrick
139e5dd7070Spatrick<!--=======================================================================-->
140e5dd7070Spatrick<h3><a name="libraryarch">Library Based Architecture</a></h3>
141e5dd7070Spatrick<!--=======================================================================-->
142e5dd7070Spatrick
143e5dd7070Spatrick<p>A major design concept for clang is its use of a library-based
144e5dd7070Spatrickarchitecture.  In this design, various parts of the front-end can be cleanly
145e5dd7070Spatrickdivided into separate libraries which can then be mixed up for different needs
146e5dd7070Spatrickand uses.  In addition, the library-based approach encourages good interfaces
147e5dd7070Spatrickand makes it easier for new developers to get involved (because they only need
148e5dd7070Spatrickto understand small pieces of the big picture).</p>
149e5dd7070Spatrick
150e5dd7070Spatrick<blockquote><p>
151e5dd7070Spatrick"The world needs better compiler tools, tools which are built as libraries.
152e5dd7070SpatrickThis design point allows reuse of the tools in new and novel ways. However,
153e5dd7070Spatrickbuilding the tools as libraries isn't enough: they must have clean APIs, be as
154e5dd7070Spatrickdecoupled from each other as possible, and be easy to modify/extend. This
155e5dd7070Spatrickrequires clean layering, decent design, and keeping the libraries independent of
156e5dd7070Spatrickany specific client."</p></blockquote>
157e5dd7070Spatrick
158e5dd7070Spatrick<p>
159e5dd7070SpatrickCurrently, clang is divided into the following libraries and tool:
160e5dd7070Spatrick</p>
161e5dd7070Spatrick
162e5dd7070Spatrick<ul>
163e5dd7070Spatrick<li><b>libsupport</b> - Basic support library, from LLVM.</li>
164e5dd7070Spatrick<li><b>libsystem</b> - System abstraction library, from LLVM.</li>
165e5dd7070Spatrick<li><b>libbasic</b> - Diagnostics, SourceLocations, SourceBuffer abstraction,
166e5dd7070Spatrick    file system caching for input source files.</li>
167e5dd7070Spatrick<li><b>libast</b> - Provides classes to represent the C AST, the C type system,
168e5dd7070Spatrick    builtin functions, and various helpers for analyzing and manipulating the
169e5dd7070Spatrick    AST (visitors, pretty printers, etc).</li>
170e5dd7070Spatrick<li><b>liblex</b> - Lexing and preprocessing, identifier hash table, pragma
171e5dd7070Spatrick    handling, tokens, and macro expansion.</li>
172e5dd7070Spatrick<li><b>libparse</b> - Parsing. This library invokes coarse-grained 'Actions'
173e5dd7070Spatrick    provided by the client (e.g. libsema builds ASTs) but knows nothing about
174e5dd7070Spatrick    ASTs or other client-specific data structures.</li>
175e5dd7070Spatrick<li><b>libsema</b> - Semantic Analysis.  This provides a set of parser actions
176e5dd7070Spatrick    to build a standardized AST for programs.</li>
177e5dd7070Spatrick<li><b>libcodegen</b> - Lower the AST to LLVM IR for optimization &amp; code
178e5dd7070Spatrick    generation.</li>
179e5dd7070Spatrick<li><b>librewrite</b> - Editing of text buffers (important for code rewriting
180e5dd7070Spatrick    transformation, like refactoring).</li>
181e5dd7070Spatrick<li><b>libanalysis</b> - Static analysis support.</li>
182e5dd7070Spatrick<li><b>clang</b> - A driver program, client of the libraries at various
183e5dd7070Spatrick    levels.</li>
184e5dd7070Spatrick</ul>
185e5dd7070Spatrick
186e5dd7070Spatrick<p>As an example of the power of this library based design....  If you wanted to
187e5dd7070Spatrickbuild a preprocessor, you would take the Basic and Lexer libraries. If you want
188e5dd7070Spatrickan indexer, you would take the previous two and add the Parser library and
189e5dd7070Spatricksome actions for indexing. If you want a refactoring, static analysis, or
190e5dd7070Spatricksource-to-source compiler tool, you would then add the AST building and
191e5dd7070Spatricksemantic analyzer libraries.</p>
192e5dd7070Spatrick
193e5dd7070Spatrick<p>For more information about the low-level implementation details of the
194e5dd7070Spatrickvarious clang libraries, please see the <a href="docs/InternalsManual.html">
195e5dd7070Spatrickclang Internals Manual</a>.</p>
196e5dd7070Spatrick
197e5dd7070Spatrick<!--=======================================================================-->
198e5dd7070Spatrick<h3><a name="diverseclients">Support Diverse Clients</a></h3>
199e5dd7070Spatrick<!--=======================================================================-->
200e5dd7070Spatrick
201e5dd7070Spatrick<p>Clang is designed and built with many grand plans for how we can use it.  The
202e5dd7070Spatrickdriving force is the fact that we use C and C++ daily, and have to suffer due to
203e5dd7070Spatricka lack of good tools available for it.  We believe that the C and C++ tools
204e5dd7070Spatrickecosystem has been significantly limited by how difficult it is to parse and
205e5dd7070Spatrickrepresent the source code for these languages, and we aim to rectify this
206e5dd7070Spatrickproblem in clang.</p>
207e5dd7070Spatrick
208e5dd7070Spatrick<p>The problem with this goal is that different clients have very different
209e5dd7070Spatrickrequirements.  Consider code generation, for example: a simple front-end that
210e5dd7070Spatrickparses for code generation must analyze the code for validity and emit code
211e5dd7070Spatrickin some intermediate form to pass off to a optimizer or backend.  Because
212e5dd7070Spatrickvalidity analysis and code generation can largely be done on the fly, there is
213e5dd7070Spatricknot hard requirement that the front-end actually build up a full AST for all
214e5dd7070Spatrickthe expressions and statements in the code.  TCC and GCC are examples of
215e5dd7070Spatrickcompilers that either build no real AST (in the former case) or build a stripped
216e5dd7070Spatrickdown and simplified AST (in the later case) because they focus primarily on
217e5dd7070Spatrickcodegen.</p>
218e5dd7070Spatrick
219e5dd7070Spatrick<p>On the opposite side of the spectrum, some clients (like refactoring) want
220e5dd7070Spatrickhighly detailed information about the original source code and want a complete
221e5dd7070SpatrickAST to describe it with.  Refactoring wants to have information about macro
222e5dd7070Spatrickexpansions, the location of every paren expression '(((x)))' vs 'x', full
223e5dd7070Spatrickposition information, and much more.  Further, refactoring wants to look
224e5dd7070Spatrick<em>across the whole program</em> to ensure that it is making transformations
225e5dd7070Spatrickthat are safe.  Making this efficient and getting this right requires a
226e5dd7070Spatricksignificant amount of engineering and algorithmic work that simply are
227e5dd7070Spatrickunnecessary for a simple static compiler.</p>
228e5dd7070Spatrick
229e5dd7070Spatrick<p>The beauty of the clang approach is that it does not restrict how you use it.
230e5dd7070SpatrickIn particular, it is possible to use the clang preprocessor and parser to build
231e5dd7070Spatrickan extremely quick and light-weight on-the-fly code generator (similar to TCC)
232e5dd7070Spatrickthat does not build an AST at all.   As an intermediate step, clang supports
233e5dd7070Spatrickusing the current AST generation and semantic analysis code and having a code
234e5dd7070Spatrickgeneration client free the AST for each function after code generation. Finally,
235e5dd7070Spatrickclang provides support for building and retaining fully-fledged ASTs, and even
236e5dd7070Spatricksupports writing them out to disk.</p>
237e5dd7070Spatrick
238e5dd7070Spatrick<p>Designing the libraries with clean and simple APIs allows these high-level
239e5dd7070Spatrickpolicy decisions to be determined in the client, instead of forcing "one true
240e5dd7070Spatrickway" in the implementation of any of these libraries.  Getting this right is
241e5dd7070Spatrickhard, and we don't always get it right the first time, but we fix any problems
242e5dd7070Spatrickwhen we realize we made a mistake.</p>
243e5dd7070Spatrick
244e5dd7070Spatrick<!--=======================================================================-->
245e5dd7070Spatrick<h3 id="ideintegration">Integration with IDEs</h3>
246e5dd7070Spatrick<!--=======================================================================-->
247e5dd7070Spatrick
248e5dd7070Spatrick<p>
249e5dd7070SpatrickWe believe that Integrated Development Environments (IDE's) are a great way
250e5dd7070Spatrickto pull together various pieces of the development puzzle, and aim to make clang
251e5dd7070Spatrickwork well in such an environment.  The chief advantage of an IDE is that they
252e5dd7070Spatricktypically have visibility across your entire project and are long-lived
253e5dd7070Spatrickprocesses, whereas stand-alone compiler tools are typically invoked on each
254e5dd7070Spatrickindividual file in the project, and thus have limited scope.</p>
255e5dd7070Spatrick
256e5dd7070Spatrick<p>There are many implications of this difference, but a significant one has to
257e5dd7070Spatrickdo with efficiency and caching: sharing an address space across different files
258e5dd7070Spatrickin a project, means that you can use intelligent caching and other techniques to
259e5dd7070Spatrickdramatically reduce analysis/compilation time.</p>
260e5dd7070Spatrick
261e5dd7070Spatrick<p>A further difference between IDEs and batch compiler is that they often
262e5dd7070Spatrickimpose very different requirements on the front-end: they depend on high
263e5dd7070Spatrickperformance in order to provide a "snappy" experience, and thus really want
264e5dd7070Spatricktechniques like "incremental compilation", "fuzzy parsing", etc.  Finally, IDEs
265e5dd7070Spatrickoften have very different requirements than code generation, often requiring
266e5dd7070Spatrickinformation that a codegen-only frontend can throw away.  Clang is
267e5dd7070Spatrickspecifically designed and built to capture this information.
268e5dd7070Spatrick</p>
269e5dd7070Spatrick
270e5dd7070Spatrick
271e5dd7070Spatrick<!--=======================================================================-->
272e5dd7070Spatrick<h3><a name="license">Use the LLVM 'Apache 2' License</a></h3>
273e5dd7070Spatrick<!--=======================================================================-->
274e5dd7070Spatrick
275e5dd7070Spatrick<p>We actively intend for clang (and LLVM as a whole) to be used for
276e5dd7070Spatrickcommercial projects, not only as a stand-alone compiler but also as a library
277e5dd7070Spatrickembedded inside a proprietary application. We feel that the license encourages
278e5dd7070Spatrickcontributors to pick up the source and work with it, and believe that those
279e5dd7070Spatrickindividuals and organizations will contribute back their work if they do not
280e5dd7070Spatrickwant to have to maintain a fork forever (which is time consuming and expensive
281e5dd7070Spatrickwhen merges are involved). Further, nobody makes money on compilers these days,
282e5dd7070Spatrickbut many people need them to get bigger goals accomplished: it makes sense for
283e5dd7070Spatrickeveryone to work together.</p>
284e5dd7070Spatrick
285e5dd7070Spatrick<p>For more information about the LLVM/clang license, please see the <a
286e5dd7070Spatrickhref="https://llvm.org/docs/DeveloperPolicy.html#copyright-license-and-patents">LLVM License
287e5dd7070SpatrickDescription</a> for more information.</p>
288e5dd7070Spatrick
289e5dd7070Spatrick
290e5dd7070Spatrick
291e5dd7070Spatrick<!--*************************************************************************-->
292e5dd7070Spatrick<h2><a name="design">Internal Design and Implementation</a></h2>
293e5dd7070Spatrick<!--*************************************************************************-->
294e5dd7070Spatrick
295e5dd7070Spatrick<!--=======================================================================-->
296e5dd7070Spatrick<h3><a name="real">A real-world, production quality compiler</a></h3>
297e5dd7070Spatrick<!--=======================================================================-->
298e5dd7070Spatrick
299e5dd7070Spatrick<p>
300*ec727ea7SpatrickClang is designed and built by experienced compiler developers who are
301*ec727ea7Spatrickincreasingly frustrated with the problems that existing open source
302*ec727ea7Spatrickcompilers have.  Clang is carefully and thoughtfully designed and
303*ec727ea7Spatrickbuilt to provide the foundation of a whole new generation of
304*ec727ea7SpatrickC/C++/Objective C development tools, and we intend for it to be
305*ec727ea7Spatrickproduction quality.</p>
306e5dd7070Spatrick
307e5dd7070Spatrick<p>Being a production quality compiler means many things: it means being high
308e5dd7070Spatrickperformance, being solid and (relatively) bug free, and it means eventually
309e5dd7070Spatrickbeing used and depended on by a broad range of people.  While we are still in
310e5dd7070Spatrickthe early development stages, we strongly believe that this will become a
311e5dd7070Spatrickreality.</p>
312e5dd7070Spatrick
313e5dd7070Spatrick<!--=======================================================================-->
314e5dd7070Spatrick<h3><a name="simplecode">A simple and hackable code base</a></h3>
315e5dd7070Spatrick<!--=======================================================================-->
316e5dd7070Spatrick
317e5dd7070Spatrick<p>Our goal is to make it possible for anyone with a basic understanding
318e5dd7070Spatrickof compilers and working knowledge of the C/C++/ObjC languages to understand and
319e5dd7070Spatrickextend the clang source base.  A large part of this falls out of our decision to
320e5dd7070Spatrickmake the AST mirror the languages as closely as possible: you have your friendly
321e5dd7070Spatrickif statement, for statement, parenthesis expression, structs, unions, etc, all
322e5dd7070Spatrickrepresented in a simple and explicit way.</p>
323e5dd7070Spatrick
324e5dd7070Spatrick<p>In addition to a simple design, we work to make the source base approachable
325e5dd7070Spatrickby commenting it well, including citations of the language standards where
326e5dd7070Spatrickappropriate, and designing the code for simplicity.  Beyond that, clang offers
327e5dd7070Spatricka set of AST dumpers, printers, and visualizers that make it easy to put code in
328e5dd7070Spatrickand see how it is represented.</p>
329e5dd7070Spatrick
330e5dd7070Spatrick<!--=======================================================================-->
331e5dd7070Spatrick<h3><a name="unifiedparser">A single unified parser for C, Objective C, C++,
332e5dd7070Spatrickand Objective C++</a></h3>
333e5dd7070Spatrick<!--=======================================================================-->
334e5dd7070Spatrick
335e5dd7070Spatrick<p>Clang is the "C Language Family Front-end", which means we intend to support
336e5dd7070Spatrickthe most popular members of the C family.  We are convinced that the right
337e5dd7070Spatrickparsing technology for this class of languages is a hand-built recursive-descent
338e5dd7070Spatrickparser.  Because it is plain C++ code, recursive descent makes it very easy for
339e5dd7070Spatricknew developers to understand the code, it easily supports ad-hoc rules and other
340e5dd7070Spatrickstrange hacks required by C/C++, and makes it straight-forward to implement
341e5dd7070Spatrickexcellent diagnostics and error recovery.</p>
342e5dd7070Spatrick
343e5dd7070Spatrick<p>We believe that implementing C/C++/ObjC in a single unified parser makes the
344e5dd7070Spatrickend result easier to maintain and evolve than maintaining a separate C and C++
345e5dd7070Spatrickparser which must be bugfixed and maintained independently of each other.</p>
346e5dd7070Spatrick
347e5dd7070Spatrick<!--=======================================================================-->
348e5dd7070Spatrick<h3><a name="conformance">Conformance with C/C++/ObjC and their
349e5dd7070Spatrick variants</a></h3>
350e5dd7070Spatrick<!--=======================================================================-->
351e5dd7070Spatrick
352e5dd7070Spatrick<p>When you start work on implementing a language, you find out that there is a
353e5dd7070Spatrickhuge gap between how the language works and how most people understand it to
354e5dd7070Spatrickwork.  This gap is the difference between a normal programmer and a (scary?
355e5dd7070Spatricksuper-natural?) "language lawyer", who knows the ins and outs of the language
356e5dd7070Spatrickand can grok standardese with ease.</p>
357e5dd7070Spatrick
358e5dd7070Spatrick<p>In practice, being conformant with the languages means that we aim to support
359e5dd7070Spatrickthe full language, including the dark and dusty corners (like trigraphs,
360e5dd7070Spatrickpreprocessor arcana, C99 VLAs, etc).  Where we support extensions above and
361e5dd7070Spatrickbeyond what the standard officially allows, we make an effort to explicitly call
362e5dd7070Spatrickthis out in the code and emit warnings about it (which are disabled by default,
363e5dd7070Spatrickbut can optionally be mapped to either warnings or errors), allowing you to use
364e5dd7070Spatrickclang in "strict" mode if you desire.</p>
365e5dd7070Spatrick
366e5dd7070Spatrick</div>
367e5dd7070Spatrick</body>
368e5dd7070Spatrick</html>
369