aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-family
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-07-23 01:54:24 +0000
committerJoseph Myers <jsm28@gcc.gnu.org>2013-07-23 02:54:24 +0100
commit433cc7b037fbadc15e43083aed48e2f71e0e282f (patch)
tree8f1ed7da1d779f1cb23b3f07c33506309da58d45 /gcc/c-family
parentee07556fbdb3501008215a9b5718087dfdd360e5 (diff)
downloadgcc-433cc7b037fbadc15e43083aed48e2f71e0e282f.zip
gcc-433cc7b037fbadc15e43083aed48e2f71e0e282f.tar.gz
gcc-433cc7b037fbadc15e43083aed48e2f71e0e282f.tar.bz2
c-common.h (enum rid): New constant.
2013-07-23 Tom Tromey <tromey@redhat.com> Joseph Myers <joseph@codesourcery.com> c-family: * c-common.h (enum rid) <RID_GENERIC>: New constant. * c-common.c (c_common_reswords): Add _Generic. c: * c-parser.c (struct c_generic_association): New. (c_generic_association_d): New typedef. (c_parser_generic_selection): New function. (c_parser_postfix_expression): Handle RID_GENERIC. testsuite: * gcc.dg/c11-generic-1.c: New file. * gcc.dg/c11-generic-2.c: New file. Co-Authored-By: Joseph Myers <joseph@codesourcery.com> From-SVN: r201153
Diffstat (limited to 'gcc/c-family')
-rw-r--r--gcc/c-family/ChangeLog5
-rw-r--r--gcc/c-family/c-common.c1
-rw-r--r--gcc/c-family/c-common.h2
3 files changed, 7 insertions, 1 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
index 6695206..487f880 100644
--- a/gcc/c-family/ChangeLog
+++ b/gcc/c-family/ChangeLog
@@ -1,3 +1,8 @@
+2013-07-23 Tom Tromey <tromey@redhat.com>
+
+ * c-common.h (enum rid) <RID_GENERIC>: New constant.
+ * c-common.c (c_common_reswords): Add _Generic.
+
2013-07-21 Ondřej Bílka <neleai@seznam.cz>
* c-common.c: Fix typos.
diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c
index 04d1bd5..7bba376 100644
--- a/gcc/c-family/c-common.c
+++ b/gcc/c-family/c-common.c
@@ -412,6 +412,7 @@ const struct c_common_resword c_common_reswords[] =
{ "_Sat", RID_SAT, D_CONLY | D_EXT },
{ "_Static_assert", RID_STATIC_ASSERT, D_CONLY },
{ "_Noreturn", RID_NORETURN, D_CONLY },
+ { "_Generic", RID_GENERIC, D_CONLY },
{ "__FUNCTION__", RID_FUNCTION_NAME, 0 },
{ "__PRETTY_FUNCTION__", RID_PRETTY_FUNCTION_NAME, 0 },
{ "__alignof", RID_ALIGNOF, 0 },
diff --git a/gcc/c-family/c-common.h b/gcc/c-family/c-common.h
index 915887cf..dc430c3 100644
--- a/gcc/c-family/c-common.h
+++ b/gcc/c-family/c-common.h
@@ -105,7 +105,7 @@ enum rid
RID_FRACT, RID_ACCUM,
/* C11 */
- RID_ALIGNAS,
+ RID_ALIGNAS, RID_GENERIC,
/* This means to warn that this is a C++ keyword, and then treat it
as a normal identifier. */