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
Unified · Split
| @@ -309,7 +309,9 @@ typedef const gimple *const_gimple_ptr; · 308 unmodified lines | ||
| 309 | 309 | #define gimple gimple_ptr |
| 310 | 310 | #define const_gimple const_gimple_ptr |
| 311 | 311 | #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)) | |
| 313 | 315 | |
| 314 | 316 | /* gimple related */ |
| 315 | 317 | static inline gimple gimple_build_assign_with_ops(enum tree_code subcode, tree lhs, tree op1, tree op2 MEM_STAT_DECL) |