https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90590
--- Comment #6 from Marek Polacek <mpolacek at gcc dot gnu.org> --- (In reply to Jonathan Wakely from comment #5) > (In reply to Marek Polacek from comment #4) > > Suppressing the warning when the enumerator comes from a system header > > should be fairly easy using in_system_header_at. > > Yes, I got that working myself already. Do you want this PR then? > > But for the "use reserved > > names" requirement -- should we just check whether the name of an enumerator > > starts with an '_'? > > No, because "_" and "_foo" are not reserved names. > > I suggest "_[_A-Z]" i.e. underscore followed by either another underscore or > uppercase letter. In practice, for libstdc++'s purposes, it might be enough > to check for just "_[_S]" but I'd have to double-check that. Good point.