xref: /netbsd-src/usr.bin/c11/c11.1 (revision 89ab2da6d93b52fcac3cf727cd8c374042c9a3e8)
1.\"	$NetBSD: c11.1,v 1.2 2016/10/03 08:20:12 wiz Exp $
2.\"
3.\" Copyright (c) 1999-2016 The NetBSD Foundation, Inc.
4.\" All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\"
15.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
16.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
17.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
18.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
19.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25.\" POSSIBILITY OF SUCH DAMAGE.
26.\"
27.Dd October 2, 2016
28.Dt C11 1
29.Os
30.Sh NAME
31.Nm c11
32.Nd ANSI (2011) C compiler
33.Sh SYNOPSIS
34.Nm
35.Op Fl pedantic
36.Op Fl pedantic-errors
37.Op Fl D_ANSI_SOURCE
38.Op Ar options ...
39.Sh DESCRIPTION
40Calls the C compiler (cc) with the given
41.Ar options ,
42using a C language environment compatible with the
43.St -isoC-2011
44specification.
45.Pp
46This includes
47alignment specification
48.Ar ( _Alignas
49specifier,
50.Ar _Alignof operator ) ,
51the
52.Ar _Noreturn
53function specifier,
54type-generic expressions using the
55.Ar _Generic
56keyword,
57multi-threading support,
58improved unicode handling,
59anonymous structures and unions,
60static assertions,
61exclusive create-and-open mode for
62.Xr fopen 3 ,
63the
64.Xr quick_exit 3
65function performing minimal cleanup,
66macros for construction of complex values.
67.Pp
68The following options are available:
69.Bl -tag -width "-pedantic-errorsxx"
70.It Fl pedantic
71Issue extra warnings defined by ANSI for use of non-ANSI features.
72.It Fl pedantic-errors
73Issue errors instead of warnings that normally would be presented by
74.Fl pedantic .
75.It Fl D_ANSI_SOURCE
76Tell the system header file set to use an ANSI-conformant "clean" namespace.
77.El
78.Sh SEE ALSO
79.Xr cc 1
80.Sh STANDARDS
81.Nm
82is a
83.Nx
84extension.
85.Sh HISTORY
86.Nm
87first appeared in
88.Nx 8.0 .
89.Sh BUGS
90Since
91.Nm
92is a shell wrapper script to
93.Ar cc ,
94compile errors are prefixed by
95.Dq cc: .
96