Mon Oct 3 01:00:27 2016 UTC ()
Import c11(1) - a cc -std=c11 wrapper

This script is similar to c89(1) and c99(1).

It's a NetBSD extension. The c89(1) and c99(1) scripts are part of POSIX.


(kamil)
diff -r1.2062 -r1.2063 src/distrib/sets/lists/comp/mi
diff -r1.225 -r1.226 src/usr.bin/Makefile
diff -r0 -r1.1 src/usr.bin/c11/Makefile
diff -r0 -r1.1 src/usr.bin/c11/c11.1
diff -r0 -r1.1 src/usr.bin/c11/c11.sh

cvs diff -r1.2062 -r1.2063 src/distrib/sets/lists/comp/mi (expand / switch to unified diff)

--- src/distrib/sets/lists/comp/mi 2016/10/02 17:19:00 1.2062
+++ src/distrib/sets/lists/comp/mi 2016/10/03 01:00:27 1.2063
@@ -1,24 +1,25 @@ @@ -1,24 +1,25 @@
1# $NetBSD: mi,v 1.2062 2016/10/02 17:19:00 kamil Exp $ 1# $NetBSD: mi,v 1.2063 2016/10/03 01:00:27 kamil Exp $
2# 2#
3# Note: don't delete entries from here - mark them as "obsolete" instead. 3# Note: don't delete entries from here - mark them as "obsolete" instead.
4./etc/mtree/set.comp comp-sys-root 4./etc/mtree/set.comp comp-sys-root
5./usr/bin/addr2line comp-debug-bin binutils 5./usr/bin/addr2line comp-debug-bin binutils
6./usr/bin/ar comp-util-bin binutils 6./usr/bin/ar comp-util-bin binutils
7./usr/bin/as comp-util-bin binutils 7./usr/bin/as comp-util-bin binutils
8./usr/bin/asa comp-fortran-bin 8./usr/bin/asa comp-fortran-bin
9./usr/bin/atf-compile comp-obsolete obsolete 9./usr/bin/atf-compile comp-obsolete obsolete
10./usr/bin/c++ comp-cxx-bin gcccmds 10./usr/bin/c++ comp-cxx-bin gcccmds
11./usr/bin/c++filt comp-cxx-bin binutils 11./usr/bin/c++filt comp-cxx-bin binutils
 12./usr/bin/c11 comp-c-bin
12./usr/bin/c89 comp-c-bin 13./usr/bin/c89 comp-c-bin
13./usr/bin/c99 comp-c-bin 14./usr/bin/c99 comp-c-bin
14./usr/bin/cc comp-c-bin gcccmds 15./usr/bin/cc comp-c-bin gcccmds
15./usr/bin/clang comp-c-bin llvm 16./usr/bin/clang comp-c-bin llvm
16./usr/bin/clang++ comp-c-bin llvm 17./usr/bin/clang++ comp-c-bin llvm
17./usr/bin/clang-cpp comp-c-bin llvm 18./usr/bin/clang-cpp comp-c-bin llvm
18./usr/bin/clang-tblgen comp-c-bin llvm 19./usr/bin/clang-tblgen comp-c-bin llvm
19./usr/bin/config comp-util-bin 20./usr/bin/config comp-util-bin
20./usr/bin/crunchgen comp-c-bin 21./usr/bin/crunchgen comp-c-bin
21./usr/bin/crunchide comp-c-bin 22./usr/bin/crunchide comp-c-bin
22./usr/bin/ctfconvert comp-util-bin ctf 23./usr/bin/ctfconvert comp-util-bin ctf
23./usr/bin/ctfdump comp-util-bin ctf 24./usr/bin/ctfdump comp-util-bin ctf
24./usr/bin/ctfmerge comp-util-bin ctf 25./usr/bin/ctfmerge comp-util-bin ctf
@@ -3922,26 +3923,27 @@ @@ -3922,26 +3923,27 @@
3922./usr/share/locale/sr/LC_MESSAGES/gettext-tools.mo comp-c_locale-sr nls 3923./usr/share/locale/sr/LC_MESSAGES/gettext-tools.mo comp-c_locale-sr nls
3923./usr/share/locale/sv/LC_MESSAGES/gettext-tools.mo comp-c_locale-sv nls 3924./usr/share/locale/sv/LC_MESSAGES/gettext-tools.mo comp-c_locale-sv nls
3924./usr/share/locale/sv/LC_MESSAGES/gettext.mo comp-obsolete obsolete 3925./usr/share/locale/sv/LC_MESSAGES/gettext.mo comp-obsolete obsolete
3925./usr/share/locale/tr/LC_MESSAGES/gettext-tools.mo comp-c_locale-tr nls 3926./usr/share/locale/tr/LC_MESSAGES/gettext-tools.mo comp-c_locale-tr nls
3926./usr/share/locale/uk/LC_MESSAGES/gettext-tools.mo comp-c_locale-uk nls 3927./usr/share/locale/uk/LC_MESSAGES/gettext-tools.mo comp-c_locale-uk nls
3927./usr/share/locale/zh_CN/LC_MESSAGES/gettext-tools.mo comp-c_locale-zh_CN nls 3928./usr/share/locale/zh_CN/LC_MESSAGES/gettext-tools.mo comp-c_locale-zh_CN nls
3928./usr/share/locale/zh_TW/LC_MESSAGES/gettext-tools.mo comp-c_locale-zh_TW nls 3929./usr/share/locale/zh_TW/LC_MESSAGES/gettext-tools.mo comp-c_locale-zh_TW nls
3929./usr/share/man/cat1/addr2line.0 comp-debug-catman binutils,.cat 3930./usr/share/man/cat1/addr2line.0 comp-debug-catman binutils,.cat
3930./usr/share/man/cat1/ar.0 comp-util-catman binutils,.cat 3931./usr/share/man/cat1/ar.0 comp-util-catman binutils,.cat
3931./usr/share/man/cat1/as.0 comp-util-catman binutils,.cat 3932./usr/share/man/cat1/as.0 comp-util-catman binutils,.cat
3932./usr/share/man/cat1/asa.0 comp-fortran-catman .cat 3933./usr/share/man/cat1/asa.0 comp-fortran-catman .cat
3933./usr/share/man/cat1/c++.0 comp-cxx-catman gcccmds,.cat 3934./usr/share/man/cat1/c++.0 comp-cxx-catman gcccmds,.cat
3934./usr/share/man/cat1/c++filt.0 comp-cxx-catman binutils,.cat 3935./usr/share/man/cat1/c++filt.0 comp-cxx-catman binutils,.cat
 3936./usr/share/man/cat1/c11.0 comp-c-catman .cat
3935./usr/share/man/cat1/c89.0 comp-c-catman .cat 3937./usr/share/man/cat1/c89.0 comp-c-catman .cat
3936./usr/share/man/cat1/c99.0 comp-c-catman .cat 3938./usr/share/man/cat1/c99.0 comp-c-catman .cat
3937./usr/share/man/cat1/cc.0 comp-c-catman gcccmds,.cat 3939./usr/share/man/cat1/cc.0 comp-c-catman gcccmds,.cat
3938./usr/share/man/cat1/cccp.0 comp-util-catman gcccmds,.cat 3940./usr/share/man/cat1/cccp.0 comp-util-catman gcccmds,.cat
3939./usr/share/man/cat1/config.0 comp-util-catman .cat 3941./usr/share/man/cat1/config.0 comp-util-catman .cat
3940./usr/share/man/cat1/crunchgen.0 comp-c-catman .cat 3942./usr/share/man/cat1/crunchgen.0 comp-c-catman .cat
3941./usr/share/man/cat1/crunchide.0 comp-c-catman .cat 3943./usr/share/man/cat1/crunchide.0 comp-c-catman .cat
3942./usr/share/man/cat1/cvs.0 comp-cvs-catman cvs,.cat 3944./usr/share/man/cat1/cvs.0 comp-cvs-catman cvs,.cat
3943./usr/share/man/cat1/cvslatest.0 comp-cvs-catman cvs,.cat 3945./usr/share/man/cat1/cvslatest.0 comp-cvs-catman cvs,.cat
3944./usr/share/man/cat1/elf2aout.0 comp-sysutil-catman .cat 3946./usr/share/man/cat1/elf2aout.0 comp-sysutil-catman .cat
3945./usr/share/man/cat1/elf2ecoff.0 comp-sysutil-catman .cat 3947./usr/share/man/cat1/elf2ecoff.0 comp-sysutil-catman .cat
3946./usr/share/man/cat1/elfedit.0 comp-util-catman binutils,.cat 3948./usr/share/man/cat1/elfedit.0 comp-util-catman binutils,.cat
3947./usr/share/man/cat1/f77.0 comp-obsolete obsolete 3949./usr/share/man/cat1/f77.0 comp-obsolete obsolete
@@ -11295,26 +11297,27 @@ @@ -11295,26 +11297,27 @@
11295./usr/share/man/cat9/x86/wrmsr.0 comp-sys-catman .cat 11297./usr/share/man/cat9/x86/wrmsr.0 comp-sys-catman .cat
11296./usr/share/man/cat9/x86/x86_msr_xcall.0 comp-sys-catman .cat 11298./usr/share/man/cat9/x86/x86_msr_xcall.0 comp-sys-catman .cat
11297./usr/share/man/cat9/xc_broadcast.0 comp-sys-catman .cat 11299./usr/share/man/cat9/xc_broadcast.0 comp-sys-catman .cat
11298./usr/share/man/cat9/xc_unicast.0 comp-sys-catman .cat 11300./usr/share/man/cat9/xc_unicast.0 comp-sys-catman .cat
11299./usr/share/man/cat9/xc_wait.0 comp-sys-catman .cat 11301./usr/share/man/cat9/xc_wait.0 comp-sys-catman .cat
11300./usr/share/man/cat9/xcall.0 comp-sys-catman .cat 11302./usr/share/man/cat9/xcall.0 comp-sys-catman .cat
11301./usr/share/man/cat9/yield.0 comp-sys-catman .cat 11303./usr/share/man/cat9/yield.0 comp-sys-catman .cat
11302./usr/share/man/html1/addr2line.html comp-debug-htmlman binutils,html 11304./usr/share/man/html1/addr2line.html comp-debug-htmlman binutils,html
11303./usr/share/man/html1/ar.html comp-util-htmlman binutils,html 11305./usr/share/man/html1/ar.html comp-util-htmlman binutils,html
11304./usr/share/man/html1/as.html comp-util-htmlman binutils,html 11306./usr/share/man/html1/as.html comp-util-htmlman binutils,html
11305./usr/share/man/html1/asa.html comp-fortran-htmlman html 11307./usr/share/man/html1/asa.html comp-fortran-htmlman html
11306./usr/share/man/html1/c++.html comp-cxx-htmlman gcccmds,html 11308./usr/share/man/html1/c++.html comp-cxx-htmlman gcccmds,html
11307./usr/share/man/html1/c++filt.html comp-cxx-htmlman binutils,html 11309./usr/share/man/html1/c++filt.html comp-cxx-htmlman binutils,html
 11310./usr/share/man/html1/c11.html comp-c-htmlman html
11308./usr/share/man/html1/c89.html comp-c-htmlman html 11311./usr/share/man/html1/c89.html comp-c-htmlman html
11309./usr/share/man/html1/c99.html comp-c-htmlman html 11312./usr/share/man/html1/c99.html comp-c-htmlman html
11310./usr/share/man/html1/cc.html comp-c-htmlman gcccmds,html 11313./usr/share/man/html1/cc.html comp-c-htmlman gcccmds,html
11311./usr/share/man/html1/cccp.html comp-util-htmlman gcccmds,html 11314./usr/share/man/html1/cccp.html comp-util-htmlman gcccmds,html
11312./usr/share/man/html1/config.html comp-util-htmlman html 11315./usr/share/man/html1/config.html comp-util-htmlman html
11313./usr/share/man/html1/crunchgen.html comp-c-htmlman html 11316./usr/share/man/html1/crunchgen.html comp-c-htmlman html
11314./usr/share/man/html1/crunchide.html comp-c-htmlman html 11317./usr/share/man/html1/crunchide.html comp-c-htmlman html
11315./usr/share/man/html1/cvs.html comp-cvs-htmlman cvs,html 11318./usr/share/man/html1/cvs.html comp-cvs-htmlman cvs,html
11316./usr/share/man/html1/cvslatest.html comp-cvs-htmlman cvs,html 11319./usr/share/man/html1/cvslatest.html comp-cvs-htmlman cvs,html
11317./usr/share/man/html1/elf2aout.html comp-sysutil-htmlman html 11320./usr/share/man/html1/elf2aout.html comp-sysutil-htmlman html
11318./usr/share/man/html1/elf2ecoff.html comp-sysutil-htmlman html 11321./usr/share/man/html1/elf2ecoff.html comp-sysutil-htmlman html
11319./usr/share/man/html1/elfedit.html comp-util-htmlman binutils,html 11322./usr/share/man/html1/elfedit.html comp-util-htmlman binutils,html
11320./usr/share/man/html1/f77.html comp-fortran-htmlman obsolete 11323./usr/share/man/html1/f77.html comp-fortran-htmlman obsolete
@@ -18407,26 +18410,27 @@ @@ -18407,26 +18410,27 @@
18407./usr/share/man/html9/x86/wrmsr.html comp-sys-htmlman html 18410./usr/share/man/html9/x86/wrmsr.html comp-sys-htmlman html
18408./usr/share/man/html9/x86/x86_msr_xcall.html comp-sys-htmlman html 18411./usr/share/man/html9/x86/x86_msr_xcall.html comp-sys-htmlman html
18409./usr/share/man/html9/xc_broadcast.html comp-sys-htmlman html 18412./usr/share/man/html9/xc_broadcast.html comp-sys-htmlman html
18410./usr/share/man/html9/xc_unicast.html comp-sys-htmlman html 18413./usr/share/man/html9/xc_unicast.html comp-sys-htmlman html
18411./usr/share/man/html9/xc_wait.html comp-sys-htmlman html 18414./usr/share/man/html9/xc_wait.html comp-sys-htmlman html
18412./usr/share/man/html9/xcall.html comp-sys-htmlman html 18415./usr/share/man/html9/xcall.html comp-sys-htmlman html
18413./usr/share/man/html9/yield.html comp-sys-htmlman html 18416./usr/share/man/html9/yield.html comp-sys-htmlman html
18414./usr/share/man/man1/addr2line.1 comp-debug-man binutils,.man 18417./usr/share/man/man1/addr2line.1 comp-debug-man binutils,.man
18415./usr/share/man/man1/ar.1 comp-util-man binutils,.man 18418./usr/share/man/man1/ar.1 comp-util-man binutils,.man
18416./usr/share/man/man1/as.1 comp-util-man binutils,.man 18419./usr/share/man/man1/as.1 comp-util-man binutils,.man
18417./usr/share/man/man1/asa.1 comp-fortran-man .man 18420./usr/share/man/man1/asa.1 comp-fortran-man .man
18418./usr/share/man/man1/c++.1 comp-cxx-man gcccmds,.man 18421./usr/share/man/man1/c++.1 comp-cxx-man gcccmds,.man
18419./usr/share/man/man1/c++filt.1 comp-cxx-man binutils,.man 18422./usr/share/man/man1/c++filt.1 comp-cxx-man binutils,.man
 18423./usr/share/man/man1/c11.1 comp-c-man .man
18420./usr/share/man/man1/c89.1 comp-c-man .man 18424./usr/share/man/man1/c89.1 comp-c-man .man
18421./usr/share/man/man1/c99.1 comp-c-man .man 18425./usr/share/man/man1/c99.1 comp-c-man .man
18422./usr/share/man/man1/cc.1 comp-c-man gcccmds,.man 18426./usr/share/man/man1/cc.1 comp-c-man gcccmds,.man
18423./usr/share/man/man1/cccp.1 comp-util-man gcccmds,.man 18427./usr/share/man/man1/cccp.1 comp-util-man gcccmds,.man
18424./usr/share/man/man1/config.1 comp-util-man .man 18428./usr/share/man/man1/config.1 comp-util-man .man
18425./usr/share/man/man1/crunchgen.1 comp-c-man .man 18429./usr/share/man/man1/crunchgen.1 comp-c-man .man
18426./usr/share/man/man1/crunchide.1 comp-c-man .man 18430./usr/share/man/man1/crunchide.1 comp-c-man .man
18427./usr/share/man/man1/cvs.1 comp-cvs-man cvs,.man 18431./usr/share/man/man1/cvs.1 comp-cvs-man cvs,.man
18428./usr/share/man/man1/cvslatest.1 comp-cvs-man cvs,.man 18432./usr/share/man/man1/cvslatest.1 comp-cvs-man cvs,.man
18429./usr/share/man/man1/elf2aout.1 comp-sysutil-man .man 18433./usr/share/man/man1/elf2aout.1 comp-sysutil-man .man
18430./usr/share/man/man1/elf2ecoff.1 comp-sysutil-man .man 18434./usr/share/man/man1/elf2ecoff.1 comp-sysutil-man .man
18431./usr/share/man/man1/elfedit.1 comp-util-man binutils,.man 18435./usr/share/man/man1/elfedit.1 comp-util-man binutils,.man
18432./usr/share/man/man1/f77.1 comp-obsolete obsolete 18436./usr/share/man/man1/f77.1 comp-obsolete obsolete

cvs diff -r1.225 -r1.226 src/usr.bin/Makefile (expand / switch to unified diff)

--- src/usr.bin/Makefile 2016/06/04 15:27:11 1.225
+++ src/usr.bin/Makefile 2016/10/03 01:00:27 1.226
@@ -1,21 +1,21 @@ @@ -1,21 +1,21 @@
1# $NetBSD: Makefile,v 1.225 2016/06/04 15:27:11 agc Exp $ 1# $NetBSD: Makefile,v 1.226 2016/10/03 01:00:27 kamil Exp $
2# from: @(#)Makefile 8.3 (Berkeley) 1/7/94 2# from: @(#)Makefile 8.3 (Berkeley) 1/7/94
3 3
4.include <bsd.own.mk> 4.include <bsd.own.mk>
5 5
6SUBDIR= apply asa at audio audiocfg \ 6SUBDIR= apply asa at audio audiocfg \
7 banner basename biff bthset btkey btpin \ 7 banner basename biff bthset btkey btpin \
8 bzip2 bzip2recover c89 c99 cal calendar cap_mkdb cdplay \ 8 bzip2 bzip2recover c11 c89 c99 cal calendar cap_mkdb cdplay \
9 checknr chflags chpass cksum cmp cleantags col colcrt colrm \ 9 checknr chflags chpass cksum cmp cleantags col colcrt colrm \
10 column comm compress config crunch csplit ctags cut cvslatest \ 10 column comm compress config crunch csplit ctags cut cvslatest \
11 deroff db dirname du \ 11 deroff db dirname du \
12 eject elf2aout elf2ecoff env error expand extattr \ 12 eject elf2aout elf2ecoff env error expand extattr \
13 false fdformat fgen fincore find finger flock fmt fold fpr from \ 13 false fdformat fgen fincore find finger flock fmt fold fpr from \
14 fsplit fstat ftp gcore genassym gencat getaddrinfo getconf getent \ 14 fsplit fstat ftp gcore genassym gencat getaddrinfo getconf getent \
15 getopt gettext gprof \ 15 getopt gettext gprof \
16 head hexdump iconv id indent infocmp innetgr ipcrm ipcs join jot \ 16 head hexdump iconv id indent infocmp innetgr ipcrm ipcs join jot \
17 kdump ktrace ktruss lam last lastcomm ldd leave \ 17 kdump ktrace ktruss lam last lastcomm ldd leave \
18 locale locate lock logger login logname look lorder m4 \ 18 locale locate lock logger login logname look lorder m4 \
19 machine mail make man menuc mesg midiplay midirecord mixerctl \ 19 machine mail make man menuc mesg midiplay midirecord mixerctl \
20 mkcsmapper mkdep mkesdb mkfifo mklocale mkstr mktemp mkubootimage \ 20 mkcsmapper mkdep mkesdb mkfifo mklocale mkstr mktemp mkubootimage \
21 moduli msgc msgs \ 21 moduli msgc msgs \

File Added: src/usr.bin/c11/Makefile
#	$NetBSD: Makefile,v 1.1 2016/10/03 01:00:27 kamil Exp $

SCRIPTS=       c11.sh
SCRIPTSDIR=    /usr/bin

MAN=		c11.1

.include <bsd.prog.mk>

File Added: src/usr.bin/c11/c11.1
.\"	$NetBSD: c11.1,v 1.1 2016/10/03 01:00:27 kamil Exp $
.\"
.\" Copyright (c) 1999-2016 The NetBSD Foundation, Inc.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd October 2, 2016
.Dt C11 1
.Os
.Sh NAME
.Nm c11
.Nd ANSI (2011) C compiler
.Sh SYNOPSIS
.Nm
.Op Fl pedantic
.Op Fl pedantic-errors
.Op Fl D_ANSI_SOURCE
.Op options ...
.Sh DESCRIPTION
Calls the C compiler (cc) with the given
.Ar options ,
using a C language environment compatible with the
.St -isoC-2011
specification.
.Pp
This includes
alignment specification (
.Ar _Alignas
specifier,
.Ar _Alignof operator ) ,
the
.Ar _Noreturn
function specifier,
type-generic expressions using the
.Ar _Generic
keyword,
multi-threading support,
improved unicode handling,
anonymous structures and unions,
static assertions,
exclusive create-and-open mode for
.Xr fopen 3 ,
the
.Xr quick_exit 3
function performing minimal cleanup,
macros for construction of complex values.
.Pp
The following options are available:
.Bl -tag -width "-pedantic-errorsxx"
.It Fl pedantic
Issue extra warnings defined by ANSI for use of non-ANSI features.
.It Fl pedantic-errors
Issue errors instead of warnings that normally would be presented by
.Fl pedantic .
.It Fl D_ANSI_SOURCE
Tell the system header file set to use an ANSI-conformant "clean" namespace.
.El
.Sh SEE ALSO
.Xr cc 1
.Sh STANDARDS
.Nm
is
.Nx
extension.
.Sh HISTORY
.Nm
first appeared in
.Nx 8.0 .
.Sh BUGS
Since
.Nm
is a shell wrapper script to
.Ar cc ,
compile errors are prefixed by "cc:".

File Added: src/usr.bin/c11/c11.sh
#!/bin/sh
exec /usr/bin/cc -std=c11 "$@"