Go to file
Joseph Myers c76dc9c32d Add -std=c17, -std=gnu17.
C17, a bug-fix version of the C11 standard with DR resolutions
integrated, will soon go to ballot.  This patch adds corresponding
options -std=c17, -std=gnu17 (new default version, replacing
-std=gnu11 as the default), -std=iso9899:2017.  As a bug-fix version
of the standard, there is no need for flag_isoc17 or any options for
compatibility warnings; however, there is a new __STDC_VERSION__
value, so new cpplib languages CLK_GNUC17 and CLK_STDC17 are added to
support using that new value with the new options.  (If the standard
ends up being published in 2018 and being known as C18, option aliases
can be added.  Note however that -std=iso9899:199409 corresponds to a
__STDC_VERSION__ value rather than a publication date.)

(There are a couple of DR resolutions needing implementing in GCC, but
that's independent of the new options.)

(I'd propose to add -std=c2x / -std=gnu2x / -Wc11-c2x-compat for the
next major C standard revision once there are actually C2x drafts
being issued with new features included.)

Bootstrapped with no regressions for x86_64-pc-linux-gnu.

gcc:
	* doc/invoke.texi (C Dialect Options): Document -std=c17,
	-std=iso9899:2017 and -std=gnu17.
	* doc/standards.texi (C Language): Document C17 support.
	* doc/cpp.texi (Overview): Mention -std=c17.
	(Standard Predefined Macros): Document C11 and C17 values of
	__STDC_VERSION__.  Do not refer to C99 support as incomplete.
	* doc/extend.texi (Inline): Do not list individual options for
	standards newer than C99.
	* dwarf2out.c (highest_c_language, gen_compile_unit_die): Handle
	"GNU C17".
	* config/rl78/rl78.c (rl78_option_override): Handle "GNU C17"
	language name.

gcc/c-family:
	* c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
	* c-opts.c (set_std_c17): New function.
	(c_common_init_options): Use gnu17 as default C version.
	(c_common_handle_option): Handle -std=c17 and -std=gnu17.

gcc/testsuite:
	* gcc.dg/c17-version-1.c, gcc.dg/c17-version-2.c: New tests.

libcpp:
	* include/cpplib.h (enum c_lang): Add CLK_GNUC17 and CLK_STDC17.
	* init.c (lang_defaults): Add GNUC17 and STDC17 data.
	(cpp_init_builtins): Handle C17 value of __STDC_VERSION__.

From-SVN: r254216
2017-10-30 12:17:40 +00:00
INSTALL
config Add bootstrap-cet.mk to bootstrap GCC with Intel CET 2017-10-24 05:50:03 -07:00
contrib Handle libbacktrace in contrib/gcc_update 2017-10-02 13:56:50 +02:00
fixincludes fixinc.in (dirname): Change sed from 's|[^/]*/||' to 's|[^/]*//*||'. 2017-10-13 09:28:41 -06:00
gcc Add -std=c17, -std=gnu17. 2017-10-30 12:17:40 +00:00
gnattools re PR ada/81878 (--disable-bootstrap --enable-languages=ada fails) 2017-08-17 13:39:58 +00:00
gotools Makefile.am (check-go-tool): Output colon after ${fl}. 2017-10-25 22:00:50 +00:00
include Add INCLUDE_UNIQUE_PTR and use it (PR bootstrap/82610) 2017-10-23 20:25:58 +00:00
intl
libada
libatomic [arm] Fix architecture selection when building libatomic with automatic FPU selection 2017-10-20 12:33:39 +00:00
libbacktrace ztest.c (test_large): Pass unsigned long *, not size_t *, to zlib uncompress function. 2017-10-06 13:37:20 +00:00
libcc1 [C++ PATCH] Move mangling alias out of :: 2017-10-04 16:55:54 +00:00
libcilkrts os-unix-sysdep.c (__cilkrts_getticks): Adjust preprocessor test for SPARC/Linux. 2017-06-23 17:33:43 +00:00
libcpp Add -std=c17, -std=gnu17. 2017-10-30 12:17:40 +00:00
libdecnumber bid2dpd_dpd2bid.c (_bid_to_dpd32): Fix whitespace. 2017-06-29 11:35:03 -06:00
libffi Import from libffi master repository. 2017-10-03 14:26:31 -04:00
libgcc rl78.md: New define_expand "subdi3". 2017-10-23 13:54:02 -04:00
libgfortran re PR libfortran/81938 (valgrind error message and heap-buffer-overflow on address sanitized libgfortran.so) 2017-10-27 17:50:22 +00:00
libgo debug/dwarf: support 64-bit DWARF in byte order check 2017-10-20 18:34:36 +00:00
libgomp target.c (struct gomp_coalesce_buf): New type. 2017-10-28 09:02:39 +02:00
libhsail-rt [BRIGFE] Improved support for function and module scope group 2017-09-27 15:40:24 +00:00
libiberty PR82687, g++.dg/asan/default-options-1.C fails with PR82575 fix 2017-10-24 23:15:01 +10:30
libitm
libmpx
libobjc [2/77] Add an E_ prefix to case statements 2017-08-30 11:08:28 +00:00
liboffloadmic
libquadmath re PR libquadmath/81848 (Add PowerPC support to libquadmath) 2017-09-01 22:10:57 +00:00
libsanitizer re PR sanitizer/82595 (bootstrap fails in libsanitizer on powerpc64-unknown-linux-gnu) 2017-10-20 09:32:35 +02:00
libssp
libstdc++-v3 Simplify _Node_insert_return to avoid including <tuple> 2017-10-27 18:49:36 +01:00
libvtv
lto-plugin re PR lto/81487 ([mingw32] ld.exe: error: asprintf failed) 2017-07-21 15:58:14 +00:00
maintainer-scripts update_version_svn: Ignore the GCC 5 branch. 2017-10-10 15:10:28 +02:00
zlib
.dir-locals.el
.gitattributes
.gitignore
ABOUT-NLS
COPYING
COPYING.LIB
COPYING.RUNTIME
COPYING3
COPYING3.LIB
ChangeLog Fix profiledbootstrap. 2017-10-27 13:13:05 +00:00
ChangeLog.jit
ChangeLog.tree-ssa
MAINTAINERS MAINTAINERS (write after approval): Add myself. 2017-10-16 23:36:39 +02:00
Makefile.def re PR bootstrap/81217 (Makefile:22754: warning: overriding recipe for target 'profiledbootstrap') 2017-06-28 07:54:14 +00:00
Makefile.in Fix profiledbootstrap. 2017-10-27 13:13:05 +00:00
Makefile.tpl Fix profiledbootstrap. 2017-10-27 13:13:05 +00:00
README
compile
config-ml.in
config.guess
config.rpath
config.sub
configure configure.ac (target-libffi): Don't disable for AIX. 2017-07-28 14:56:28 -04:00
configure.ac configure.ac (target-libffi): Don't disable for AIX. 2017-07-28 14:56:28 -04:00
depcomp
install-sh
libtool-ldflags
libtool.m4
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
lt~obsolete.m4
missing
mkdep
mkinstalldirs
move-if-change
symlink-tree
ylwrap

README

This directory contains the GNU Compiler Collection (GCC).

The GNU Compiler Collection is free software.  See the files whose
names start with COPYING for copying permission.  The manuals, and
some of the runtime libraries, are under different terms; see the
individual source files for details.

The directory INSTALL contains copies of the installation information
as HTML and plain text.  The source of this information is
gcc/doc/install.texi.  The installation information includes details
of what is included in the GCC sources and what files GCC installs.

See the file gcc/doc/gcc.texi (together with other files that it
includes) for usage and porting information.  An online readable
version of the manual is in the files gcc/doc/gcc.info*.

See http://gcc.gnu.org/bugs/ for how to report bugs usefully.

Copyright years on GCC source files may be listed using range
notation, e.g., 1987-2012, indicating that every year in the range,
inclusive, is a copyrightable year that could otherwise be listed
individually.