Module Name: src Committed By: kamil Date: Mon Oct 3 01:00:27 UTC 2016
Modified Files: src/distrib/sets/lists/comp: mi src/usr.bin: Makefile Added Files: src/usr.bin/c11: Makefile c11.1 c11.sh Log Message: 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. To generate a diff of this commit: cvs rdiff -u -r1.2062 -r1.2063 src/distrib/sets/lists/comp/mi cvs rdiff -u -r1.225 -r1.226 src/usr.bin/Makefile cvs rdiff -u -r0 -r1.1 src/usr.bin/c11/Makefile src/usr.bin/c11/c11.1 \ src/usr.bin/c11/c11.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/distrib/sets/lists/comp/mi diff -u src/distrib/sets/lists/comp/mi:1.2062 src/distrib/sets/lists/comp/mi:1.2063 --- src/distrib/sets/lists/comp/mi:1.2062 Sun Oct 2 17:19:00 2016 +++ src/distrib/sets/lists/comp/mi Mon Oct 3 01:00:27 2016 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.2062 2016/10/02 17:19:00 kamil Exp $ +# $NetBSD: mi,v 1.2063 2016/10/03 01:00:27 kamil Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. ./etc/mtree/set.comp comp-sys-root @@ -9,6 +9,7 @@ ./usr/bin/atf-compile comp-obsolete obsolete ./usr/bin/c++ comp-cxx-bin gcccmds ./usr/bin/c++filt comp-cxx-bin binutils +./usr/bin/c11 comp-c-bin ./usr/bin/c89 comp-c-bin ./usr/bin/c99 comp-c-bin ./usr/bin/cc comp-c-bin gcccmds @@ -3932,6 +3933,7 @@ ./usr/share/man/cat1/asa.0 comp-fortran-catman .cat ./usr/share/man/cat1/c++.0 comp-cxx-catman gcccmds,.cat ./usr/share/man/cat1/c++filt.0 comp-cxx-catman binutils,.cat +./usr/share/man/cat1/c11.0 comp-c-catman .cat ./usr/share/man/cat1/c89.0 comp-c-catman .cat ./usr/share/man/cat1/c99.0 comp-c-catman .cat ./usr/share/man/cat1/cc.0 comp-c-catman gcccmds,.cat @@ -11305,6 +11307,7 @@ ./usr/share/man/html1/asa.html comp-fortran-htmlman html ./usr/share/man/html1/c++.html comp-cxx-htmlman gcccmds,html ./usr/share/man/html1/c++filt.html comp-cxx-htmlman binutils,html +./usr/share/man/html1/c11.html comp-c-htmlman html ./usr/share/man/html1/c89.html comp-c-htmlman html ./usr/share/man/html1/c99.html comp-c-htmlman html ./usr/share/man/html1/cc.html comp-c-htmlman gcccmds,html @@ -18417,6 +18420,7 @@ ./usr/share/man/man1/asa.1 comp-fortran-man .man ./usr/share/man/man1/c++.1 comp-cxx-man gcccmds,.man ./usr/share/man/man1/c++filt.1 comp-cxx-man binutils,.man +./usr/share/man/man1/c11.1 comp-c-man .man ./usr/share/man/man1/c89.1 comp-c-man .man ./usr/share/man/man1/c99.1 comp-c-man .man ./usr/share/man/man1/cc.1 comp-c-man gcccmds,.man Index: src/usr.bin/Makefile diff -u src/usr.bin/Makefile:1.225 src/usr.bin/Makefile:1.226 --- src/usr.bin/Makefile:1.225 Sat Jun 4 15:27:11 2016 +++ src/usr.bin/Makefile Mon Oct 3 01:00:27 2016 @@ -1,11 +1,11 @@ -# $NetBSD: Makefile,v 1.225 2016/06/04 15:27:11 agc Exp $ +# $NetBSD: Makefile,v 1.226 2016/10/03 01:00:27 kamil Exp $ # from: @(#)Makefile 8.3 (Berkeley) 1/7/94 .include <bsd.own.mk> SUBDIR= apply asa at audio audiocfg \ banner basename biff bthset btkey btpin \ - bzip2 bzip2recover c89 c99 cal calendar cap_mkdb cdplay \ + bzip2 bzip2recover c11 c89 c99 cal calendar cap_mkdb cdplay \ checknr chflags chpass cksum cmp cleantags col colcrt colrm \ column comm compress config crunch csplit ctags cut cvslatest \ deroff db dirname du \ Added files: Index: src/usr.bin/c11/Makefile diff -u /dev/null src/usr.bin/c11/Makefile:1.1 --- /dev/null Mon Oct 3 01:00:28 2016 +++ src/usr.bin/c11/Makefile Mon Oct 3 01:00:27 2016 @@ -0,0 +1,8 @@ +# $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> Index: src/usr.bin/c11/c11.1 diff -u /dev/null src/usr.bin/c11/c11.1:1.1 --- /dev/null Mon Oct 3 01:00:28 2016 +++ src/usr.bin/c11/c11.1 Mon Oct 3 01:00:27 2016 @@ -0,0 +1,94 @@ +.\" $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:". Index: src/usr.bin/c11/c11.sh diff -u /dev/null src/usr.bin/c11/c11.sh:1.1 --- /dev/null Mon Oct 3 01:00:28 2016 +++ src/usr.bin/c11/c11.sh Mon Oct 3 01:00:27 2016 @@ -0,0 +1,2 @@ +#!/bin/sh +exec /usr/bin/cc -std=c11 "$@"