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: Patch for constexpr variable templates


On 07/25/2014 07:43 AM, Braden Obrzut wrote:
This patch only covers constexpr variable templates, so it makes sense
to produce an error for now.

Fair enough, but in that case let's use 'sorry' rather then 'error' to be clear that it's a missing feature.

I ran the testsuite with your patch applied and got a bunch of failures. For instance,

+FAIL: g++.old-deja/g++.other/anon2.C  -std=c++11 (internal compiler error)

is crashing here:

+         || TREE_CODE (orig_declarator) == TEMPLATE_ID_EXPR))

because orig_declarator is null.  Please fix this and the other failures.

+                 "Variable templates only available with "

Diagnostics aren't capitalized.

          gcc_assert (decl == error_mark_node
+                 || variable_template_p (tmpl)
                      || !(DECL_CONSTRUCTOR_P (decl)

Indentation mismatch.

       DECL_EXTERNAL (d) = 0;

-      /* Enter the scope of D so that access-checking works correctly.  */
-      push_nested_class (DECL_CONTEXT (d));
+         /* Enter the scope of D so that access-checking works correctly.  */
+         bool enter_context = DECL_CLASS_SCOPE_P (d);

Indentation mismatch.

Jason


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