+2018-11-07 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/87904
+ * cp-tree.h (struct tree_overload): Fix comment.
+ * tree.c (ovl_iterator::reveal_node): Propagate OVL_DEDUP_P.
+
2018-11-04 Jason Merrill <jason@redhat.com>
Implement UDL changes from P0732R2.
#define OVL_SINGLE_P(NODE) \
(TREE_CODE (NODE) != OVERLOAD || !OVL_CHAIN (NODE))
-/* OVL_HIDDEN_P nodes come first, then OVL_USING_P nodes, then regular
- fns. */
+/* OVL_HIDDEN_P nodes come before other nodes. */
struct GTY(()) tree_overload {
struct tree_common common;
OVL_HIDDEN_P (node) = false;
if (tree chain = OVL_CHAIN (node))
- if (TREE_CODE (chain) == OVERLOAD
- && (OVL_USING_P (chain) || OVL_HIDDEN_P (chain)))
+ if (TREE_CODE (chain) == OVERLOAD)
{
- /* The node needs moving, and the simplest way is to remove it
- and reinsert. */
- overload = remove_node (overload, node);
- overload = ovl_insert (OVL_FUNCTION (node), overload);
+ if (OVL_HIDDEN_P (chain))
+ {
+ /* The node needs moving, and the simplest way is to remove it
+ and reinsert. */
+ overload = remove_node (overload, node);
+ overload = ovl_insert (OVL_FUNCTION (node), overload);
+ }
+ else if (OVL_DEDUP_P (chain))
+ OVL_DEDUP_P (node) = true;
}
return overload;
}
+2018-11-07 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/87904
+ * g++.dg/lookup/pr87904.C: New.
+
2018-11-07 Uros Bizjak <ubizjak@gmail.com>
* gcc.dg/pr87874.c: Compile only for int128 effective target.