-Wint-conversion, -Wincompatible-pointer-types, -Wpointer-sign: Are they hiding constraint C violations?

Joseph Myers joseph@codesourcery.com
Thu Nov 10 23:33:14 GMT 2022


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
joseph@codesourcery.com


More information about the Gcc mailing list