<html>
<head>
<title>Clang Compiler User's Manual</title>
<link type="text/css" rel="stylesheet" href="../menu.css" />
<link type="text/css" rel="stylesheet" href="../content.css" />
<style type="text/css">
td {
vertical-align: top;
}
</style>
</head>
<body>
<!--#include virtual="../menu.html.incl"-->
<div id="content">
<h1>Clang Compiler User's Manual</h1>
<ul>
<li><a href="#intro">Introduction</a>
<ul>
<li><a href="#terminology">Terminology</a></li>
<li><a href="#basicusage">Basic Usage</a></li>
</ul>
</li>
<li><a href="#commandline">Command Line Options</a>
<ul>
<li><a href="#cl_diagnostics">Options to Control Error and Warning
Messages</a></li>
</ul>
</li>
<li><a href="#general_features">Language and Target-Independent Features</a>
<ul>
<li><a href="#diagnostics">Controlling Errors and Warnings</a>
<ul>
<li><a href="#diagnostics_display">Controlling How Clang Displays Diagnostics</a></li>
<li><a href="#diagnostics_mappings">Diagnostic Mappings</a></li>
<li><a href="#diagnostics_categories">Diagnostic Categories</a></li>
<li><a href="#diagnostics_commandline">Controlling Diagnostics via Command Line Flags</a></li>
<li><a href="#diagnostics_pragmas">Controlling Diagnostics via Pragmas</a></li>
<li><a href="#diagnostics_enable_everything">Enabling All Warnings</a></li>
<li><a href="#analyzer_diagnositics">Controlling Static Analyzer Diagnostics</a></li>
</ul>
</li>
<li><a href="#precompiledheaders">Precompiled Headers</a></li>
<li><a href="#codegen">Controlling Code Generation</a></li>
</ul>
</li>
<li><a href="#c">C Language Features</a>
<ul>
<li><a href="#c_ext">Extensions supported by clang</a></li>
<li><a href="#c_modes">Differences between various standard modes</a></li>
<li><a href="#c_unimpl_gcc">GCC extensions not implemented yet</a></li>
<li><a href="#c_unsupp_gcc">Intentionally unsupported GCC extensions</a></li>
<li><a href="#c_ms">Microsoft extensions</a></li>
</ul>
</li>
<li><a href="#target_features">Target-Specific Features and Limitations</a>
<ul>
<li><a href="#target_arch">CPU Architectures Features and Limitations</a>
<ul>
<li><a href="#target_arch_x86">X86</a></li>
<li><a href="#target_arch_arm">ARM</a></li>
<li><a href="#target_arch_other">Other platforms</a></li>
</ul>
</li>
<li><a href="#target_os">Operating System Features and Limitations</a>
<ul>
<li><a href="#target_os_darwin">Darwin (Mac OS/X)</a></li>
<li>Linux, etc.</li>
<li><a href="#target_os_win32">Windows</a></li>
</ul>
</li>
</ul>
</li>
</ul>
<!-- ======================================================================= -->
<h2 id="intro">Introduction</h2>
<!-- ======================================================================= -->
<p>The Clang Compiler is an open-source compiler for the C family of programming
languages, aiming to be the best in class implementation of these languages.
Clang builds on the LLVM optimizer and code generator, allowing it to provide
high-quality optimization and code generation support for many targets. For
more general information, please see the <a href="http://clang.llvm.org">Clang
Web Site</a> or the <a href="http://llvm.org">LLVM Web Site</a>.</p>
<p>This document describes important notes about using Clang as a compiler for
an end-user, documenting the supported features, command line options, etc. If
you are interested in using Clang to build a tool that processes code, please
see <a href="InternalsManual.html">the Clang Internals Manual</a>. If you are
interested in the <a href="http://clang.llvm.org/StaticAnalysis.html">Clang
Static Analyzer</a>, please see its web page.</p>
<p>Clang is designed to support the C family of programming languages, which
includes <a href="#c">C</a>, <a href="#objc">Objective-C</a>, <a
href="#cxx">C++</a>, and <a href="#objcxx"