https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102772
--- Comment #42 from Jonathan Wakely <redi at gcc dot gnu.org> --- It should really depend on -faligned-new which can be set for C++14 and C++11 too (and I guess C++98 in theory, but that would break when you include <new> because you can't have 'enum class align_val_t' in C++98). So cxx_dialect isn't right. Does -faligned-new get processed already before the hook? If so, can you just check if the threadshold is already non-zero and change if so? If it's zero, leave it as zero.