https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109642
--- Comment #9 from Marek Polacek <mpolacek at gcc dot gnu.org> --- My plan is to allow users to do #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdangling-reference" ... #pragma GCC diagnostic pop around the *class* itself to suppress the warning, not every use of the class. Sorry, Carlos and Barry, that I haven't gotten around to it yet.