All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Saitz <ingo@hannover.ccc.de>
To: "Valdis Klētnieks" <valdis.kletnieks@vt.edu>
Cc: Kees Cook <kees@kernel.org>,
	linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: Build error in next-20260223 gcc-plugins/latent_entropy_plugin.so
Date: Sat, 14 Mar 2026 15:44:08 +0100	[thread overview]
Message-ID: <abV0OEcoN6H_QZEP@spatz.zoo> (raw)
In-Reply-To: <abVntmj9O7uXnES2@spatz.zoo>

[-- Attachment #1: Type: text/plain, Size: 140 bytes --]

On Sat, Mar 14, 2026 at 02:50:46PM +0100, Ingo Saitz wrote:
> I attached [...]

Grml, here you go

    Ingo
-- 
const_cast<long double>(Λ)

[-- Attachment #2: 0001-Replace-CONST_CAST-with-const_cast.patch --]
[-- Type: text/x-diff, Size: 1671 bytes --]

From 552485b879d19780afd3614d69508c3ea7cb242f Mon Sep 17 00:00:00 2001
From: Ingo Saitz <ingo@hannover.ccc.de>
Date: Sat, 14 Mar 2026 14:24:56 +0100
Subject: [PATCH] Replace CONST_CAST with const_cast<>.

For gcc-16, this was removed in gcc trunk

see commits
  c3d96ff9e916c02584aa081f03ab999292efbb50
  458c7926d48959abcb2c1adaa22458e27459a551
---
 scripts/gcc-plugins/gcc-common.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/scripts/gcc-plugins/gcc-common.h b/scripts/gcc-plugins/gcc-common.h
index 8f1b3500f8e2..7b3517b31e0a 100644
--- a/scripts/gcc-plugins/gcc-common.h
+++ b/scripts/gcc-plugins/gcc-common.h
@@ -309,7 +309,7 @@ typedef const gimple *const_gimple_ptr;
 #define gimple gimple_ptr
 #define const_gimple const_gimple_ptr
 #undef CONST_CAST_GIMPLE
-#define CONST_CAST_GIMPLE(X) CONST_CAST(gimple, (X))
+#define CONST_CAST_GIMPLE(X) const_cast<gimple>((X))
 
 /* gimple related */
 static inline gimple gimple_build_assign_with_ops(enum tree_code subcode, tree lhs, tree op1, tree op2 MEM_STAT_DECL)
@@ -414,7 +414,7 @@ static inline void ipa_remove_stmt_references(symtab_node *referring_node, gimpl
 #ifdef __cplusplus
 static inline void debug_tree(const_tree t)
 {
-	debug_tree(CONST_CAST_TREE(t));
+	debug_tree(const_cast<tree>(t));
 }
 
 static inline void debug_gimple_stmt(const_gimple s)
@@ -422,7 +422,7 @@ static inline void debug_gimple_stmt(const_gimple s)
 	debug_gimple_stmt(CONST_CAST_GIMPLE(s));
 }
 #else
-#define debug_tree(t) debug_tree(CONST_CAST_TREE(t))
+#define debug_tree(t) debug_tree(const_cast<tree>(t))
 #define debug_gimple_stmt(s) debug_gimple_stmt(CONST_CAST_GIMPLE(s))
 #endif
 
-- 
2.53.0


  reply	other threads:[~2026-03-14 14:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-25  5:20 Build error in next-20260223 gcc-plugins/latent_entropy_plugin.so Valdis Klētnieks
2026-02-25  7:33 ` Kees Cook
2026-02-25 15:14   ` Valdis Klētnieks
2026-03-14 13:50     ` Ingo Saitz
2026-03-14 14:44       ` Ingo Saitz [this message]
2026-03-20 19:23         ` Kees Cook
2026-03-21 12:25           ` Ingo Saitz

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=abV0OEcoN6H_QZEP@spatz.zoo \
    --to=ingo@hannover.ccc.de \
    --cc=kees@kernel.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=valdis.kletnieks@vt.edu \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.