From: Tobias Burnus <tobias@codesourcery.com>
To: Jakub Jelinek <jakub@redhat.com>, gcc-patches <gcc-patches@gcc.gnu.org>
Subject: [patch] libgomp/splay-tree.h: Fix splay_tree_prefix handling
Date: Fri, 22 Jul 2022 11:47:42 +0200 [thread overview]
Message-ID: <20aab88c-3970-1ac8-92c2-cc2e03e8296e@codesourcery.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 489 bytes --]
As is, it is only a cleanup/consistency patch.
However, I did run into this issue when working on the reverse-offload
implementation (to handle reverse lookups of vars and functions).
OK for mainline?
Tobias
-----------------
Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955
[-- Attachment #2: splay-tree-fix.diff --]
[-- Type: text/x-patch, Size: 1824 bytes --]
libgomp/splay-tree.h: Fix splay_tree_prefix handling
When splay_tree_prefix is defined, the .h file
defines splay_* macros to add the prefix. However,
before those were only unset when additionally
splay_tree_c was defined.
Additionally, for consistency undefine splay_tree_c
also when no splay_tree_prefix is defined - there
is no interdependence either.
libgomp/ChangeLog:
* splay-tree.h: Fix splay_* macro unsetting if
splay_tree_prefix is defined.
libgomp/splay-tree.h | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/libgomp/splay-tree.h b/libgomp/splay-tree.h
index 8d66dfb51e0..992381c4000 100644
--- a/libgomp/splay-tree.h
+++ b/libgomp/splay-tree.h
@@ -107,24 +107,24 @@ extern void splay_tree_foreach (splay_tree, splay_tree_callback, void *);
#else /* splay_tree_c */
# ifdef splay_tree_prefix
# include "splay-tree.c"
-# undef splay_tree_name_1
-# undef splay_tree_name
-# undef splay_tree_node_s
-# undef splay_tree_s
-# undef splay_tree_key_s
-# undef splay_tree_node
-# undef splay_tree
-# undef splay_tree_key
-# undef splay_compare
-# undef splay_tree_lookup
-# undef splay_tree_insert
-# undef splay_tree_remove
-# undef splay_tree_foreach
-# undef splay_tree_callback
-# undef splay_tree_c
# endif
+# undef splay_tree_c
#endif /* #ifndef splay_tree_c */
#ifdef splay_tree_prefix
+# undef splay_tree_name_1
+# undef splay_tree_name
+# undef splay_tree_node_s
+# undef splay_tree_s
+# undef splay_tree_key_s
+# undef splay_tree_node
+# undef splay_tree
+# undef splay_tree_key
+# undef splay_compare
+# undef splay_tree_lookup
+# undef splay_tree_insert
+# undef splay_tree_remove
+# undef splay_tree_foreach
+# undef splay_tree_callback
# undef splay_tree_prefix
#endif
next reply other threads:[~2022-07-22 9:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-22 9:47 Tobias Burnus [this message]
2022-08-17 13:31 ` Jakub Jelinek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20aab88c-3970-1ac8-92c2-cc2e03e8296e@codesourcery.com \
--to=tobias@codesourcery.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).