"try-scope",
"catch-scope",
"for-scope",
+ "cond-init-scope",
+ "stmt-expr-scope",
"function-parameter-scope",
"class-scope",
+ "enum-scope",
"namespace-scope",
"template-parameter-scope",
- "template-explicit-spec-scope"
+ "template-explicit-spec-scope",
+ "transaction-scope",
+ "openmp-scope"
};
- const scope_kind kind = scope->explicit_spec_p
- ? sk_template_spec : scope->kind;
+ static_assert (ARRAY_SIZE (scope_kind_names) == sk_count,
+ "must keep names aligned with scope_kind enum");
+
+ scope_kind kind = scope->kind;
+ if (kind == sk_template_parms && scope->explicit_spec_p)
+ kind = sk_template_spec;
return scope_kind_names[kind];
}
explicit specialization is introduced by
"template <>", this scope is always empty. */
sk_transaction, /* A synchronized or atomic statement. */
- sk_omp /* An OpenMP structured block. */
+ sk_omp, /* An OpenMP structured block. */
+ sk_count /* Number of scope_kind enumerations. */
};
struct GTY(()) cp_class_binding {