This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [C++ PATCH] C++0x scoped enumerations


+lookup_enumerator (tree enumtype, tree name)
+{
+  tree e;
+  gcc_assert (enumtype && TREE_CODE (enumtype) == ENUMERAL_TYPE);
+
+  for (e = TYPE_VALUES (enumtype); e; e = TREE_CHAIN (e))
+    {
+      if (TREE_PURPOSE (e) == name)
+        return TREE_VALUE (e);
+    }

Please use purpose_member here.


+/* Parse the qualifying entity in a nested-namesspecifier. For C++98,

Missing a -.


+      /* In C++0x, parse the optional `struct' or `class' key.  */
+      if (cxx_dialect != cxx98
+          && (cp_lexer_next_token_is_keyword (parser->lexer, RID_CLASS)
+              || cp_lexer_next_token_is_keyword (parser->lexer, RID_STRUCT)))
+        cp_lexer_consume_token (parser->lexer);

Please parse it in C++98 mode as well and then complain so people know that it's implemented, they just need to give the right flag. Ditto with the underlying type.


Jason


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]