https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117871
Bug ID: 117871 Summary: cfg_hooks variables should be const at least and maybe a virtual functions Product: gcc Version: 15.0 Status: UNCONFIRMED Keywords: internal-improvement Severity: enhancement Priority: P3 Component: middle-end Assignee: pinskia at gcc dot gnu.org Reporter: pinskia at gcc dot gnu.org Target Milestone: --- cfg_hooks hooks themselves don't change, just which hooks are active changes. So the hooks should become a class with virtual functions. At bare min, the hook variables should become const since they don't change at runtime. Mine for GCC 16.