xref: /freebsd/usr.bin/c99/c99.1 (revision b2c76c41be32f904179efed29c0ca04d53f3996c)
198c59a0aSTim J. Robbins.\"
298c59a0aSTim J. Robbins.\" Copyright (c) 1997 Joerg Wunsch
398c59a0aSTim J. Robbins.\"
498c59a0aSTim J. Robbins.\" All rights reserved.
598c59a0aSTim J. Robbins.\"
698c59a0aSTim J. Robbins.\" Redistribution and use in source and binary forms, with or without
798c59a0aSTim J. Robbins.\" modification, are permitted provided that the following conditions
898c59a0aSTim J. Robbins.\" are met:
998c59a0aSTim J. Robbins.\" 1. Redistributions of source code must retain the above copyright
1098c59a0aSTim J. Robbins.\"    notice, this list of conditions and the following disclaimer.
1198c59a0aSTim J. Robbins.\" 2. Redistributions in binary form must reproduce the above copyright
1298c59a0aSTim J. Robbins.\"    notice, this list of conditions and the following disclaimer in the
1398c59a0aSTim J. Robbins.\"    documentation and/or other materials provided with the distribution.
1498c59a0aSTim J. Robbins.\"
1598c59a0aSTim J. Robbins.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
1698c59a0aSTim J. Robbins.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
1798c59a0aSTim J. Robbins.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
1898c59a0aSTim J. Robbins.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
1998c59a0aSTim J. Robbins.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
2098c59a0aSTim J. Robbins.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2198c59a0aSTim J. Robbins.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2298c59a0aSTim J. Robbins.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2398c59a0aSTim J. Robbins.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
2498c59a0aSTim J. Robbins.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2598c59a0aSTim J. Robbins.\"
26bdf35139SRuslan Ermilov.\" From FreeBSD: src/usr.bin/c89/c89.1,v 1.11 2007/03/10 07:10:01 ru Exp
2798c59a0aSTim J. Robbins.\"
28*25cedcddSChristian Brueffer.Dd July 13, 2015
2998c59a0aSTim J. Robbins.Dt C99 1
30aa12cea2SUlrich Spörlein.Os
3198c59a0aSTim J. Robbins.Sh NAME
3298c59a0aSTim J. Robbins.Nm c99
3398c59a0aSTim J. Robbins.Nd standard C language compiler
3498c59a0aSTim J. Robbins.Sh SYNOPSIS
3598c59a0aSTim J. Robbins.Nm
3698c59a0aSTim J. Robbins.Op Fl cEgs
37f682f10cSRuslan Ermilov.Oo Fl D Ar name Ns Oo = Ns Ar value Oc Oc ...
38f682f10cSRuslan Ermilov.Oo Fl I Ar directory Oc ...
39f682f10cSRuslan Ermilov.Oo Fl L Ar directory Oc ...
4098c59a0aSTim J. Robbins.Op Fl o Ar outfile
4198c59a0aSTim J. Robbins.Op Fl O Ar optlevel
42f682f10cSRuslan Ermilov.Oo Fl U Ar name Oc ...
4398c59a0aSTim J. Robbins.Ar operand ...
4498c59a0aSTim J. Robbins.Sh DESCRIPTION
4598c59a0aSTim J. RobbinsThis is the name of the C language compiler as required by the
4698c59a0aSTim J. Robbins.St -p1003.1-2001
4798c59a0aSTim J. Robbinsstandard.
4898c59a0aSTim J. Robbins.Pp
4998c59a0aSTim J. RobbinsThe
5098c59a0aSTim J. Robbins.Nm
5198c59a0aSTim J. Robbinscompiler accepts the following options:
5298c59a0aSTim J. Robbins.Bl -tag -width indent
5398c59a0aSTim J. Robbins.It Fl c
5498c59a0aSTim J. RobbinsSuppress the link-edit phase of the compilation, and do not remove any
5598c59a0aSTim J. Robbinsobject files that are produced.
5698c59a0aSTim J. Robbins.It Fl D Ar name Ns Op = Ns Ar value
5798c59a0aSTim J. RobbinsDefine name as if by a C-language
5898c59a0aSTim J. Robbins.Ic #define
59f0fab604SRuslan Ermilovdirective.
60f0fab604SRuslan ErmilovIf no
6198c59a0aSTim J. Robbins.Dq = Ns Ar value
6298c59a0aSTim J. Robbinsis given, a value of 1 will be used.
6398c59a0aSTim J. RobbinsNote that in order to request a
6498c59a0aSTim J. Robbinstranslation as specified by
65f0fab604SRuslan Ermilov.St -p1003.1-2001 ,
6698c59a0aSTim J. Robbinsyou need to define
6798c59a0aSTim J. Robbins.Dv _POSIX_C_SOURCE=200112L
68f0fab604SRuslan Ermiloveither in the source or using this option.
69f0fab604SRuslan ErmilovThe
7098c59a0aSTim J. Robbins.Fl D
7198c59a0aSTim J. Robbinsoption has lower precedence than the
7298c59a0aSTim J. Robbins.Fl U
73f0fab604SRuslan Ermilovoption.
74f0fab604SRuslan ErmilovThat is, if
7598c59a0aSTim J. Robbins.Ar name
7698c59a0aSTim J. Robbinsis used in both a
7798c59a0aSTim J. Robbins.Fl U
7898c59a0aSTim J. Robbinsand a
7998c59a0aSTim J. Robbins.Fl D
8098c59a0aSTim J. Robbinsoption,
8198c59a0aSTim J. Robbins.Ar name
82f0fab604SRuslan Ermilovwill be undefined regardless of the order of the options.
83f0fab604SRuslan ErmilovThe
8498c59a0aSTim J. Robbins.Fl D
8598c59a0aSTim J. Robbinsoption may be specified more than once.
8698c59a0aSTim J. Robbins.It Fl E
8798c59a0aSTim J. RobbinsCopy C-language source files to the standard output, expanding all
8898c59a0aSTim J. Robbinspreprocessor directives; no compilation will be performed.
8998c59a0aSTim J. Robbins.It Fl g
9098c59a0aSTim J. RobbinsProduce symbolic information in the object or executable files.
9198c59a0aSTim J. Robbins.It Fl I Ar directory
9298c59a0aSTim J. RobbinsChange the algorithm for searching for headers whose names are not
9398c59a0aSTim J. Robbinsabsolute pathnames to look in the directory named by the
9498c59a0aSTim J. Robbins.Ar directory
95f0fab604SRuslan Ermilovpathname before looking in the usual places.
96f0fab604SRuslan ErmilovThus, headers whose
97f0fab604SRuslan Ermilovnames are enclosed in double-quotes
9820a95cd6SUlrich Spörlein.Pq Qq
99f0fab604SRuslan Ermilovwill be searched for first
10098c59a0aSTim J. Robbinsin the directory of the file with the
10198c59a0aSTim J. Robbins.Ic #include
10298c59a0aSTim J. Robbinsline, then in
10398c59a0aSTim J. Robbinsdirectories named in
10498c59a0aSTim J. Robbins.Fl I
105f0fab604SRuslan Ermilovoptions, and last in the usual places.
106f0fab604SRuslan ErmilovFor headers whose names are enclosed in angle brackets
10720a95cd6SUlrich Spörlein.Pq Aq ,
108f0fab604SRuslan Ermilovthe header
10998c59a0aSTim J. Robbinswill be searched for only in directories named in
11098c59a0aSTim J. Robbins.Fl I
111f0fab604SRuslan Ermilovoptions and then in the usual places.
112f0fab604SRuslan ErmilovDirectories named in
11398c59a0aSTim J. Robbins.Fl I
114f0fab604SRuslan Ermilovoptions shall be searched in the order specified.
115f0fab604SRuslan ErmilovThe
11698c59a0aSTim J. Robbins.Fl I
11798c59a0aSTim J. Robbinsoption may be specified more than once.
11898c59a0aSTim J. Robbins.It Fl L Ar directory
11998c59a0aSTim J. RobbinsChange the algorithm of searching for the libraries named in the
12098c59a0aSTim J. Robbins.Fl l
12198c59a0aSTim J. Robbinsobjects to look in the directory named by the
12298c59a0aSTim J. Robbins.Ar directory
123f0fab604SRuslan Ermilovpathname before looking in the usual places.
124f0fab604SRuslan ErmilovDirectories named in
12598c59a0aSTim J. Robbins.Fl L
126f0fab604SRuslan Ermilovoptions will be searched in the order specified.
127f0fab604SRuslan ErmilovThe
12898c59a0aSTim J. Robbins.Fl L
12998c59a0aSTim J. Robbinsoption may be specified more than once.
13098c59a0aSTim J. Robbins.It Fl o Ar outfile
13198c59a0aSTim J. RobbinsUse the pathname
13298c59a0aSTim J. Robbins.Ar outfile ,
13398c59a0aSTim J. Robbinsinstead of the default
13498c59a0aSTim J. Robbins.Pa a.out ,
13598c59a0aSTim J. Robbinsfor the executable file produced.
13698c59a0aSTim J. Robbins.It Fl O Ar optlevel
13798c59a0aSTim J. RobbinsIf
13898c59a0aSTim J. Robbins.Ar optlevel
139f0fab604SRuslan Ermilovis zero, disable all optimizations.
140f0fab604SRuslan ErmilovOtherwise, enable optimizations at the specified level.
14198c59a0aSTim J. Robbins.It Fl s
14298c59a0aSTim J. RobbinsProduce object and/or executable files from which symbolic and other
14398c59a0aSTim J. Robbinsinformation not required for proper execution has been removed
14498c59a0aSTim J. Robbins(stripped).
14598c59a0aSTim J. Robbins.It Fl U Ar name
14698c59a0aSTim J. RobbinsRemove any initial definition of
14798c59a0aSTim J. Robbins.Ar name .
14898c59a0aSTim J. RobbinsThe
14998c59a0aSTim J. Robbins.Fl U
15098c59a0aSTim J. Robbinsoption may be specified more than once.
15198c59a0aSTim J. Robbins.El
15298c59a0aSTim J. Robbins.Pp
15398c59a0aSTim J. RobbinsAn operand is either in the form of a pathname or the form
15498c59a0aSTim J. Robbins.Fl l
155f0fab604SRuslan Ermilovlibrary.
156f0fab604SRuslan ErmilovAt least one operand of the pathname form needs to be specified.
157f0fab604SRuslan ErmilovSupported operands are of the form:
158f0fab604SRuslan Ermilov.Bl -tag -offset indent -width ".Fl l Ar library"
15998c59a0aSTim J. Robbins.It Ar file Ns Pa .c
160f0fab604SRuslan ErmilovA C-language source file to be compiled and optionally linked.
161f0fab604SRuslan ErmilovThe operand must be of this form if the
16298c59a0aSTim J. Robbins.Fl c
16398c59a0aSTim J. Robbinsoption is used.
16498c59a0aSTim J. Robbins.It Ar file Ns Pa .a
16598c59a0aSTim J. RobbinsA library of object files, as produced by
16698c59a0aSTim J. Robbins.Xr ar 1 ,
16798c59a0aSTim J. Robbinspassed directly to the link editor.
16898c59a0aSTim J. Robbins.It Ar file Ns Pa .o
16998c59a0aSTim J. RobbinsAn object file produced by
17098c59a0aSTim J. Robbins.Nm Fl c ,
17198c59a0aSTim J. Robbinsand passed directly to the link editor.
17298c59a0aSTim J. Robbins.It Fl l Ar library
17398c59a0aSTim J. RobbinsSearch the library named
17498c59a0aSTim J. Robbins.Pa lib Ns Ar library Ns Pa .a .
17598c59a0aSTim J. RobbinsA library will be searched when its name is encountered, so the
17698c59a0aSTim J. Robbinsplacement of a
17798c59a0aSTim J. Robbins.Fl l
17898c59a0aSTim J. Robbinsoperand is significant.
17998c59a0aSTim J. Robbins.El
18098c59a0aSTim J. Robbins.Sh SEE ALSO
18198c59a0aSTim J. Robbins.Xr ar 1 ,
18298c59a0aSTim J. Robbins.Xr c89 1 ,
183096dbab9SGabor Kovesdan.Xr cc 1 ,
184096dbab9SGabor Kovesdan.Xr c99 7
18598c59a0aSTim J. Robbins.Sh STANDARDS
18698c59a0aSTim J. RobbinsThe
18798c59a0aSTim J. Robbins.Nm
18898c59a0aSTim J. Robbinsutility interface conforms to
18998c59a0aSTim J. Robbins.St -p1003.1-2001 .
190