summaryrefslogtreecommitdiff
path: root/gcc/c-family/c-pretty-print.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/c-family/c-pretty-print.c')
-rw-r--r--gcc/c-family/c-pretty-print.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/c-family/c-pretty-print.c b/gcc/c-family/c-pretty-print.c
index e2809cff35b..c61c41f1810 100644
--- a/gcc/c-family/c-pretty-print.c
+++ b/gcc/c-family/c-pretty-print.c
@@ -802,6 +802,10 @@ pp_c_attributes_display (c_pretty_printer *pp, tree a)
as = lookup_attribute_spec (TREE_PURPOSE (a));
if (!as || as->affects_type_identity == false)
continue;
+ if (c_dialect_cxx ()
+ && !strcmp ("transaction_safe", as->name))
+ /* In C++ transaction_safe is printed at the end of the declarator. */
+ continue;
if (is_first)
{
pp_c_ws_string (pp, "__attribute__");