aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog19
-rw-r--r--gcc/cp/decl2.cc7
-rw-r--r--gcc/cp/pt.cc3
3 files changed, 26 insertions, 3 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 5239592..3ad8d16 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,22 @@
+2025-12-06 Jakub Jelinek <jakub@redhat.com>
+
+ * decl2.cc (is_late_template_attribute): Call lookup_attribute_spec
+ on TREE_PURPOSE (attr) rather than name. Only call
+ attribute_takes_identifier_p if get_attribute_namespace (attr) is
+ gnu_identifier.
+ * pt.cc (tsubst_attribute): Only call attribute_takes_identifier_p
+ if get_attribute_namespace (t) is gnu_identifier.
+
+2025-12-05 Tobias Burnus <tburnus@baylibre.com>
+
+ * pt.cc (tsubst_omp_clauses): Handle OMP_CLAUSE_DYN_GROUPPRIVATE.
+ * semantics.cc (finish_omp_clauses): Likewise.
+ * parser.cc (cp_parser_omp_clause_dyn_groupprivate): New.
+ (cp_parser_omp_clause_name, cp_parser_omp_all_clauses):
+ Handle 'dyn_groupprivate' clause.
+ (OMP_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DYN_GROUPPRIVATE;
+ sort clauses alphabetically.
+
2025-12-03 Jason Merrill <jason@redhat.com>
* pt.cc (dependent_implict_conv_p): Rename to...
diff --git a/gcc/cp/decl2.cc b/gcc/cp/decl2.cc
index 9e135af..8ec9740 100644
--- a/gcc/cp/decl2.cc
+++ b/gcc/cp/decl2.cc
@@ -1468,7 +1468,8 @@ is_late_template_attribute (tree attr, tree decl)
{
tree name = get_attribute_name (attr);
tree args = TREE_VALUE (attr);
- const struct attribute_spec *spec = lookup_attribute_spec (name);
+ const struct attribute_spec *spec
+ = lookup_attribute_spec (TREE_PURPOSE (attr));
tree arg;
if (!spec)
@@ -1512,7 +1513,9 @@ is_late_template_attribute (tree attr, tree decl)
second and following arguments. Attributes like mode, format,
cleanup and several target specific attributes aren't late
just because they have an IDENTIFIER_NODE as first argument. */
- if (arg == args && attribute_takes_identifier_p (name)
+ if (arg == args
+ && get_attribute_namespace (attr) == gnu_identifier
+ && attribute_takes_identifier_p (name)
&& identifier_p (t))
continue;
diff --git a/gcc/cp/pt.cc b/gcc/cp/pt.cc
index 7a019d3..8498730 100644
--- a/gcc/cp/pt.cc
+++ b/gcc/cp/pt.cc
@@ -12386,7 +12386,8 @@ tsubst_attribute (tree t, tree *decl_p, tree args,
pass it through tsubst. Attributes like mode, format,
cleanup and several target specific attributes expect it
unmodified. */
- else if (attribute_takes_identifier_p (get_attribute_name (t)))
+ else if (get_attribute_namespace (t) == gnu_identifier
+ && attribute_takes_identifier_p (get_attribute_name (t)))
{
tree chain
= tsubst_expr (TREE_CHAIN (val), args, complain, in_decl);