public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [c++-concepts] Reserving new keywords for concepts
@ 2013-02-28 14:07 Andrew Sutton
  2013-02-28 14:51 ` Gabriel Dos Reis
  0 siblings, 1 reply; 51+ messages in thread
From: Andrew Sutton @ 2013-02-28 14:07 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 313 bytes --]

Reserving a handful of new keywords for concepts and several new type
traits in preparation for future work on concepts.

Andrew

2013-02-05  Andrew Sutton  <andrew.n.sutton@gmail.com>

        * c-common.h (rid): New resreserved words for concepts.
        * c-common.c (c_common_reswords): Definitions thereof.

[-- Attachment #2: reswords.patch --]
[-- Type: application/octet-stream, Size: 1828 bytes --]

Index: gcc/c-family/c-common.c
===================================================================
--- gcc/c-family/c-common.c	(revision 196316)
+++ gcc/c-family/c-common.c	(working copy)
@@ -550,6 +550,18 @@ const struct c_common_resword c_common_r
   { "volatile",		RID_VOLATILE,	0 },
   { "wchar_t",		RID_WCHAR,	D_CXXONLY },
   { "while",		RID_WHILE,	0 },
+
+  /* Concepts-related keywords */
+  { "assume",		RID_ASSUME,	D_CXXONLY | D_CXX0X | D_CXXWARN },
+  { "axiom",		RID_AXIOM,	D_CXXONLY | D_CXX0X | D_CXXWARN },
+  { "concept",		RID_CONCEPT,	D_CXXONLY | D_CXX0X | D_CXXWARN },
+  { "forall", 		RID_FORALL,	D_CXXONLY | D_CXX0X | D_CXXWARN },
+  { "requires", 	RID_REQUIRES,	D_CXXONLY | D_CXX0X | D_CXXWARN },
+  { "__declval",        RID_DECLVAL,    D_CXXONLY | D_CXX0X | D_CXXWARN },
+  { "__is_same",        RID_IS_SAME,    D_CXXONLY | D_CXX0X | D_CXXWARN },
+  { "__is_valid_expr",  RID_IS_VALID_EXPR, D_CXXONLY | D_CXX0X | D_CXXWARN },
+  { "__is_valid_type",  RID_IS_VALID_TYPE, D_CXXONLY | D_CXX0X | D_CXXWARN },
+
   /* These Objective-C keywords are recognized only immediately after
      an '@'.  */
   { "compatibility_alias", RID_AT_ALIAS,	D_OBJC },
Index: gcc/c-family/c-common.h
===================================================================
--- gcc/c-family/c-common.h	(revision 196316)
+++ gcc/c-family/c-common.h	(working copy)
@@ -148,6 +148,14 @@ enum rid
   /* C++11 */
   RID_CONSTEXPR, RID_DECLTYPE, RID_NOEXCEPT, RID_NULLPTR, RID_STATIC_ASSERT,
 
+  /* C++ concepts */
+  RID_ASSUME,    RID_AXIOM,        RID_CONCEPT,
+  RID_FORALL,    RID_REQUIRES,
+
+  /* C++ concepts (intrinsics) */
+  RID_DECLVAL,       RID_IS_SAME,
+  RID_IS_VALID_EXPR, RID_IS_VALID_TYPE,
+
   /* Objective-C ("AT" reserved words - they are only keywords when
      they follow '@')  */
   RID_AT_ENCODE,   RID_AT_END,

^ permalink raw reply	[flat|nested] 51+ messages in thread

end of thread, other threads:[~2013-06-24 15:55 UTC | newest]

Thread overview: 51+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-28 14:07 [c++-concepts] Reserving new keywords for concepts Andrew Sutton
2013-02-28 14:51 ` Gabriel Dos Reis
2013-02-28 15:01   ` Andrew Sutton
2013-02-28 15:11     ` Gabriel Dos Reis
2013-02-28 15:54       ` Andrew Sutton
2013-02-28 15:57         ` Gabriel Dos Reis
2013-06-06 15:55   ` [c++-concepts] code review Jason Merrill
2013-06-06 17:48     ` Andrew Sutton
2013-06-06 20:29       ` Jason Merrill
2013-06-08 13:35         ` Andrew Sutton
2013-06-10  0:49           ` Gabriel Dos Reis
2013-06-10 16:27             ` Jason Merrill
2013-06-10 19:30           ` Jason Merrill
2013-06-11 13:45             ` Andrew Sutton
2013-06-11 14:27               ` Jason Merrill
2013-06-11 14:49                 ` Andrew Sutton
2013-06-11 15:00                   ` Jason Merrill
2013-06-11 15:09                     ` Andrew Sutton
2013-06-11 17:54                       ` Jason Merrill
2013-06-12 15:53             ` Gabriel Dos Reis
2013-06-12 16:35               ` Jason Merrill
2013-06-14 15:32                 ` Andrew Sutton
2013-06-15  1:40                   ` Jason Merrill
2013-06-15  2:13                     ` Gabriel Dos Reis
2013-06-17 18:11                     ` Andrew Sutton
2013-06-17 19:20                       ` Jason Merrill
2013-06-18  0:29                         ` Gabriel Dos Reis
2013-06-18 16:28                         ` Andrew Sutton
2013-06-19 14:21                           ` Jason Merrill
2013-06-19 16:10                             ` Andrew Sutton
2013-06-20  5:30                             ` Gabriel Dos Reis
2013-06-20 13:01                               ` Jason Merrill
2013-06-20 13:09                                 ` Gabriel Dos Reis
2013-06-20 13:19                                   ` Andrew Sutton
2013-06-20 13:57                                     ` Jason Merrill
2013-06-20 14:18                                       ` Andrew Sutton
2013-06-20 15:17                                         ` Jason Merrill
2013-06-20 15:22                                           ` Gabriel Dos Reis
2013-06-20 15:27                                             ` Jason Merrill
2013-06-20 15:29                                               ` Gabriel Dos Reis
2013-06-20 15:50                                           ` Andrew Sutton
2013-06-20 17:23                                             ` Jason Merrill
2013-06-20 18:33                                               ` Jason Merrill
2013-06-21 12:46                                                 ` Andrew Sutton
2013-06-24 15:55                                                   ` Jason Merrill
2013-06-20 15:20                                     ` Gabriel Dos Reis
2013-06-09 20:34         ` Oleg Endo
2013-06-10  0:34           ` Gabriel Dos Reis
2013-06-10 14:51             ` Diego Novillo
2013-06-10 22:51               ` Lawrence Crowl
2013-06-10 16:14             ` Jason Merrill

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).