public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Jason Merrill <jason@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r12-9458] Revert "c++: signed __int128_t [PR108099]"
Date: Thu, 20 Apr 2023 16:14:28 +0000 (GMT)	[thread overview]
Message-ID: <20230420161428.8961B3856DC4@sourceware.org> (raw)

https://gcc.gnu.org/g:0c97fe08e46e8ccbd6a6346b62a8df78764014ac

commit r12-9458-g0c97fe08e46e8ccbd6a6346b62a8df78764014ac
Author: Jason Merrill <jason@redhat.com>
Date:   Wed Apr 19 23:25:39 2023 -0400

    Revert "c++: signed __int128_t [PR108099]"
    
    Given the remaining issues even after these patches, let's leave this bug
    alone on the GCC 12 branch for now.
    
    This reverts commit 32955c1c2246aa336d3fd2423c32546c39a6ca30.
    This reverts commit 7b30f13b904f137c77e5180357af7917a3b47af0.

Diff:
---
 gcc/cp/decl.cc                      | 15 ++++-----------
 gcc/testsuite/g++.dg/ext/int128-7.C |  4 ----
 gcc/testsuite/g++.dg/ext/int128-8.C | 24 ------------------------
 3 files changed, 4 insertions(+), 39 deletions(-)

diff --git a/gcc/cp/decl.cc b/gcc/cp/decl.cc
index f514377dd42..ab9a009fb7e 100644
--- a/gcc/cp/decl.cc
+++ b/gcc/cp/decl.cc
@@ -12300,18 +12300,11 @@ grokdeclarator (const cp_declarator *declarator,
 	{
 	  if (typedef_decl)
 	    {
-	      pedwarn (loc, OPT_Wpedantic, "%qs specified with %qD",
-		       key, typedef_decl);
+	      pedwarn (loc, OPT_Wpedantic, "%qs specified with %qT",
+		       key, type);
 	      ok = !flag_pedantic_errors;
-	      if (is_typedef_decl (typedef_decl))
-		{
-		  type = DECL_ORIGINAL_TYPE (typedef_decl);
-		  typedef_decl = NULL_TREE;
-		}
-	      else
-		/* PR108099: __int128_t comes from c_common_nodes_and_builtins,
-		   and is not built as a typedef.  */
-		type = TREE_TYPE (typedef_decl);
+	      type = DECL_ORIGINAL_TYPE (typedef_decl);
+	      typedef_decl = NULL_TREE;
 	    }
 	  else if (declspecs->decltype_p)
 	    error_at (loc, "%qs specified with %<decltype%>", key);
diff --git a/gcc/testsuite/g++.dg/ext/int128-7.C b/gcc/testsuite/g++.dg/ext/int128-7.C
deleted file mode 100644
index bf5e8c40a4b..00000000000
--- a/gcc/testsuite/g++.dg/ext/int128-7.C
+++ /dev/null
@@ -1,4 +0,0 @@
-// PR c++/108099
-// { dg-do compile { target { c++11 && int128 } } }
-
-using i128 = signed __int128_t;	// { dg-error "specified with" }
diff --git a/gcc/testsuite/g++.dg/ext/int128-8.C b/gcc/testsuite/g++.dg/ext/int128-8.C
deleted file mode 100644
index 7e909d50873..00000000000
--- a/gcc/testsuite/g++.dg/ext/int128-8.C
+++ /dev/null
@@ -1,24 +0,0 @@
-// PR c++/108099
-// { dg-do compile { target { c++11 && int128 } } }
-// { dg-options "" }
-
-using u128 = unsigned __int128_t;
-using s128 = signed __int128_t;
-template <typename T, T v> struct integral_constant {
-  static constexpr T value = v;
-};
-typedef integral_constant <bool, false> false_type;
-typedef integral_constant <bool, true> true_type;
-template <class T, class U>
-struct is_same : false_type {};
-template <class T>
-struct is_same <T, T> : true_type {};
-static_assert (is_same <__int128, s128>::value, "");
-static_assert (is_same <signed __int128, s128>::value, "");
-static_assert (is_same <__int128_t, s128>::value, "");
-static_assert (is_same <unsigned __int128, u128>::value, ""); // { dg-bogus "" "" { xfail *-*-* } }
-static_assert (is_same <__uint128_t, u128>::value, "");	      // { dg-bogus "" "" { xfail *-*-* } }
-static_assert (sizeof (s128) == sizeof (__int128), "");
-static_assert (sizeof (u128) == sizeof (unsigned __int128), "");
-static_assert (s128(-1) < 0, "");
-static_assert (u128(-1) > 0, "");

                 reply	other threads:[~2023-04-20 16:14 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20230420161428.8961B3856DC4@sourceware.org \
    --to=jason@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /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).