History

gcc-plugins: Always define CONST_CAST_GIMPLE and CONST_CAST_TREE

For gcc-16, the CONST_CAST macro family was removed. Add back what we were using in gcc-common.h, as they are simple wrappers. See GCC commits: c3d96ff9e916c02584aa081f03ab999292efbb50 458c7926d48959abcb2c1adaa22458e27459a551

Kees Cook committed 8 months ago

Commit 905c5591 parent 7fd2df21 file · +3 −1Browse files

Showing the changes to scripts (1 of 1 file). Show all

Unified · Split

scripts/gcc-plugins/gcc-common.h+3−1
@@ -309,7 +309,9 @@ typedef const gimple *const_gimple_ptr; · 308 unmodified lines
309309 #define gimple gimple_ptr
310310 #define const_gimple const_gimple_ptr
311311 #undef CONST_CAST_GIMPLE
312−#define CONST_CAST_GIMPLE(X) CONST_CAST(gimple, (X))
312+#define CONST_CAST_GIMPLE(X) const_cast<gimple>((X))
313+#undef CONST_CAST_TREE
314+#define CONST_CAST_TREE(X) const_cast<tree>((X))
313315
314316 /* gimple related */
315317 static inline gimple gimple_build_assign_with_ops(enum tree_code subcode, tree lhs, tree op1, tree op2 MEM_STAT_DECL)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t