public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-3044] c++: rename IS_SAME_AS trait code to IS_SAME
@ 2022-10-03 15:21 Patrick Palka
  0 siblings, 0 replies; only message in thread
From: Patrick Palka @ 2022-10-03 15:21 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:35b4cbbd70b70592bd7be3b4ff0550e0de1b3b30

commit r13-3044-g35b4cbbd70b70592bd7be3b4ff0550e0de1b3b30
Author: Patrick Palka <ppalka@redhat.com>
Date:   Mon Oct 3 11:20:32 2022 -0400

    c++: rename IS_SAME_AS trait code to IS_SAME
    
    ... to match the trait's canonical spelling __is_same instead
    of its alternative spelling __is_same_as.
    
    gcc/c-family/ChangeLog:
    
            * c-common.cc (c_common_reswords): Use RID_IS_SAME instead of
            RID_IS_SAME_AS.
    
    gcc/cp/ChangeLog:
    
            * constraint.cc (diagnose_trait_expr): Use CPTK_IS_SAME instead
            of CPTK_IS_SAME_AS.
            * cp-trait.def (IS_SAME_AS): Rename to ...
            (IS_SAME): ... this.
            * pt.cc (alias_ctad_tweaks): Use CPTK_IS_SAME instead of
            CPTK_IS_SAME_AS.
            * semantics.cc (trait_expr_value): Likewise.
            (finish_trait_expr): Likewise.

Diff:
---
 gcc/c-family/c-common.cc | 2 +-
 gcc/cp/constraint.cc     | 2 +-
 gcc/cp/cp-trait.def      | 2 +-
 gcc/cp/pt.cc             | 2 +-
 gcc/cp/semantics.cc      | 4 ++--
 5 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/gcc/c-family/c-common.cc b/gcc/c-family/c-common.cc
index 3c60a89bfe2..4f9878d2695 100644
--- a/gcc/c-family/c-common.cc
+++ b/gcc/c-family/c-common.cc
@@ -509,7 +509,7 @@ const struct c_common_resword c_common_reswords[] =
 #include "cp/cp-trait.def"
 #undef DEFTRAIT
   /* An alias for __is_same.  */
-  { "__is_same_as",	RID_IS_SAME_AS, D_CXXONLY },
+  { "__is_same_as",	RID_IS_SAME,	D_CXXONLY },
 
   /* C++ transactional memory.  */
   { "synchronized",	RID_SYNCHRONIZED, D_CXX_OBJC | D_TRANSMEM },
diff --git a/gcc/cp/constraint.cc b/gcc/cp/constraint.cc
index f4145571d92..74898ca1a23 100644
--- a/gcc/cp/constraint.cc
+++ b/gcc/cp/constraint.cc
@@ -3649,7 +3649,7 @@ diagnose_trait_expr (tree expr, tree args)
     case CPTK_IS_POLYMORPHIC:
       inform (loc, "  %qT is not a polymorphic type", t1);
       break;
-    case CPTK_IS_SAME_AS:
+    case CPTK_IS_SAME:
       inform (loc, "  %qT is not the same as %qT", t1, t2);
       break;
     case CPTK_IS_STD_LAYOUT:
diff --git a/gcc/cp/cp-trait.def b/gcc/cp/cp-trait.def
index 922348a1659..823899a26c5 100644
--- a/gcc/cp/cp-trait.def
+++ b/gcc/cp/cp-trait.def
@@ -75,7 +75,7 @@ DEFTRAIT_EXPR (IS_NOTHROW_CONVERTIBLE, "__is_nothrow_convertible", 2)
 DEFTRAIT_EXPR (IS_POINTER_INTERCONVERTIBLE_BASE_OF, "__is_pointer_interconvertible_base_of", 2)
 DEFTRAIT_EXPR (IS_POD, "__is_pod", 1)
 DEFTRAIT_EXPR (IS_POLYMORPHIC, "__is_polymorphic", 1)
-DEFTRAIT_EXPR (IS_SAME_AS, "__is_same", 2)
+DEFTRAIT_EXPR (IS_SAME, "__is_same", 2)
 DEFTRAIT_EXPR (IS_STD_LAYOUT, "__is_standard_layout", 1)
 DEFTRAIT_EXPR (IS_TRIVIAL, "__is_trivial", 1)
 DEFTRAIT_EXPR (IS_TRIVIALLY_ASSIGNABLE, "__is_trivially_assignable", 2)
diff --git a/gcc/cp/pt.cc b/gcc/cp/pt.cc
index 258f76d6e47..bce2a777922 100644
--- a/gcc/cp/pt.cc
+++ b/gcc/cp/pt.cc
@@ -30029,7 +30029,7 @@ alias_ctad_tweaks (tree tmpl, tree uguides)
 	      /* FIXME this should mean they don't compare as equivalent.  */
 	      || dependent_alias_template_spec_p (atype, nt_opaque))
 	    {
-	      tree same = finish_trait_expr (loc, CPTK_IS_SAME_AS, atype, ret);
+	      tree same = finish_trait_expr (loc, CPTK_IS_SAME, atype, ret);
 	      ci = append_constraint (ci, same);
 	    }
 
diff --git a/gcc/cp/semantics.cc b/gcc/cp/semantics.cc
index 4fb0675cca9..5cc5a001498 100644
--- a/gcc/cp/semantics.cc
+++ b/gcc/cp/semantics.cc
@@ -12007,7 +12007,7 @@ trait_expr_value (cp_trait_kind kind, tree type1, tree type2)
     case CPTK_IS_POLYMORPHIC:
       return CLASS_TYPE_P (type1) && TYPE_POLYMORPHIC_P (type1);
 
-    case CPTK_IS_SAME_AS:
+    case CPTK_IS_SAME:
       return same_type_p (type1, type2);
 
     case CPTK_IS_STD_LAYOUT:
@@ -12193,7 +12193,7 @@ finish_trait_expr (location_t loc, cp_trait_kind kind, tree type1, tree type2)
     case CPTK_IS_CLASS:
     case CPTK_IS_ENUM:
     case CPTK_IS_UNION:
-    case CPTK_IS_SAME_AS:
+    case CPTK_IS_SAME:
       break;
 
     case CPTK_IS_LAYOUT_COMPATIBLE:

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-10-03 15:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-03 15:21 [gcc r13-3044] c++: rename IS_SAME_AS trait code to IS_SAME Patrick Palka

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).