Module Name: src Committed By: nia Date: Mon Oct 28 17:55:12 UTC 2024
Modified Files: src/distrib/sets/lists/comp: mi src/usr.bin: Makefile Added Files: src/usr.bin/c17: Makefile c17.1 c17.sh Log Message: Add c17(1) wrapper script for gcc with the ISO 2017 C standard. Not much reason to use this over c11(1), but it's expected to be required by upcoming POSIX revisions. To generate a diff of this commit: cvs rdiff -u -r1.2476 -r1.2477 src/distrib/sets/lists/comp/mi cvs rdiff -u -r1.240 -r1.241 src/usr.bin/Makefile cvs rdiff -u -r0 -r1.1 src/usr.bin/c17/Makefile src/usr.bin/c17/c17.1 \ src/usr.bin/c17/c17.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.2476 src/distrib/sets/lists/comp/mi:1.2477 --- src/distrib/sets/lists/comp/mi:1.2476 Tue Oct 8 23:13:10 2024 +++ src/distrib/sets/lists/comp/mi Mon Oct 28 17:55:11 2024 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.2476 2024/10/08 23:13:10 christos Exp $ +# $NetBSD: mi,v 1.2477 2024/10/28 17:55:11 nia Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. ./etc/mtree/set.comp comp-sys-root @@ -10,6 +10,7 @@ ./usr/bin/c++ comp-cxx-bin gcccmds ./usr/bin/c++filt comp-cxx-bin binutils ./usr/bin/c11 comp-c-bin +./usr/bin/c17 comp-c-bin ./usr/bin/c89 comp-c-bin ./usr/bin/c99 comp-c-bin ./usr/bin/cc comp-c-bin gcccmds @@ -4700,6 +4701,7 @@ ./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/c17.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 @@ -13292,6 +13294,7 @@ ./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/c17.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 @@ -21684,6 +21687,7 @@ ./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/c17.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.240 src/usr.bin/Makefile:1.241 --- src/usr.bin/Makefile:1.240 Mon Sep 2 05:14:45 2024 +++ src/usr.bin/Makefile Mon Oct 28 17:55:12 2024 @@ -1,11 +1,11 @@ -# $NetBSD: Makefile,v 1.240 2024/09/02 05:14:45 ozaki-r Exp $ +# $NetBSD: Makefile,v 1.241 2024/10/28 17:55:12 nia Exp $ # from: @(#)Makefile 8.3 (Berkeley) 1/7/94 .include <bsd.own.mk> SUBDIR= aiomixer apply asa at audio audiocfg \ banner base64 basename biff bthset btkey btpin \ - bzip2 bzip2recover c11 c89 c99 cal calendar cap_mkdb cdplay \ + bzip2 bzip2recover c11 c17 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 \ dc deroff db dirname du \ Added files: Index: src/usr.bin/c17/Makefile diff -u /dev/null src/usr.bin/c17/Makefile:1.1 --- /dev/null Mon Oct 28 17:55:12 2024 +++ src/usr.bin/c17/Makefile Mon Oct 28 17:55:12 2024 @@ -0,0 +1,8 @@ +# $NetBSD: Makefile,v 1.1 2024/10/28 17:55:12 nia Exp $ + +SCRIPTS= c17.sh +SCRIPTSDIR= /usr/bin + +MAN= c17.1 + +.include <bsd.prog.mk> Index: src/usr.bin/c17/c17.1 diff -u /dev/null src/usr.bin/c17/c17.1:1.1 --- /dev/null Mon Oct 28 17:55:12 2024 +++ src/usr.bin/c17/c17.1 Mon Oct 28 17:55:12 2024 @@ -0,0 +1,68 @@ +.\" $NetBSD: c17.1,v 1.1 2024/10/28 17:55:12 nia Exp $ +.\" +.\" Copyright (c) 1999-2024 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 28, 2024 +.Dt C17 1 +.Os +.Sh NAME +.Nm c17 +.Nd ISO (2017) C compiler +.Sh SYNOPSIS +.Nm +.Op Fl pedantic +.Op Fl pedantic-errors +.Op Fl D_ANSI_SOURCE +.Op Ar options ... +.Sh DESCRIPTION +Calls the C compiler (cc) with the given +.Ar options , +using a C language environment compatible with the +.St -isoC-2017 +specification. +.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 HISTORY +.Nm +first appeared in +.Nx 11.0 . +.Sh BUGS +Since +.Nm +is a shell wrapper script to +.Ar cc , +compile errors are prefixed by +.Dq cc: . Index: src/usr.bin/c17/c17.sh diff -u /dev/null src/usr.bin/c17/c17.sh:1.1 --- /dev/null Mon Oct 28 17:55:12 2024 +++ src/usr.bin/c17/c17.sh Mon Oct 28 17:55:12 2024 @@ -0,0 +1,2 @@ +#!/bin/sh +exec /usr/bin/cc -std=c17 "$@"