On Thu, 10 Nov 2022, Florian Weimer via Gcc wrote: > I assumed that there was a rule similar to the the rule for #error for > any kind of diagnostic, which would mean that GCC errors are diagnostic > messages in the sense of the standard, but GCC warnings are not.
The rule (for C) is that any diagnostic required by the standard should either be a warning or a pedwarn (where -pedantic-errors turns the latter but not the former into errors). There are a few cases where -pedantic enables warnings that aren't pedwarns because they aren't required by the standard; for example, -Wformat -pedantic warnings for use of printf format extensions. -- Joseph S. Myers jos...@codesourcery.com