aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/rl78
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2017-10-30 12:17:40 +0000
committerJoseph Myers <jsm28@gcc.gnu.org>2017-10-30 12:17:40 +0000
commitc76dc9c32d616eff1e0ae162042f1c0f8ca65fbf (patch)
treeb75365b3cb27dcf745496a2403394a4df80386d6 /gcc/config/rl78
parentaa650b641022754c1ee6a58130fe2984d06d9657 (diff)
downloadgcc-c76dc9c32d616eff1e0ae162042f1c0f8ca65fbf.zip
gcc-c76dc9c32d616eff1e0ae162042f1c0f8ca65fbf.tar.gz
gcc-c76dc9c32d616eff1e0ae162042f1c0f8ca65fbf.tar.bz2
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
Diffstat (limited to 'gcc/config/rl78')
-rw-r--r--gcc/config/rl78/rl78.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/config/rl78/rl78.c b/gcc/config/rl78/rl78.c
index c835dc0..7b381b1 100644
--- a/gcc/config/rl78/rl78.c
+++ b/gcc/config/rl78/rl78.c
@@ -360,6 +360,7 @@ rl78_option_override (void)
if (TARGET_ES0
&& strcmp (lang_hooks.name, "GNU C")
&& strcmp (lang_hooks.name, "GNU C11")
+ && strcmp (lang_hooks.name, "GNU C17")
&& strcmp (lang_hooks.name, "GNU C89")
&& strcmp (lang_hooks.name, "GNU C99")
/* Compiling with -flto results in a language of GNU GIMPLE being used... */