On Wed, 10 May 2023 at 17:36, Joel Sherrill <j...@rtems.org> wrote:
>
>
>
> On Wed, May 10, 2023 at 10:14 AM Jakub Jelinek <ja...@redhat.com> wrote:
>>
>> On Wed, May 10, 2023 at 10:10:37AM -0500, Joel Sherrill wrote:
>> > > > What practices might the GCC community recommend to a project
>> > > > wanting to discover the issues uncovered and slowly address them? I
>> > >
>> > > -Werror=implicit-int
>> > > -Werror=implicit-function-declaration
>> > > -Werror=int-conversion
>> > >
>> >
>> > Thanks. We already  use -Wall which is documented to turn on the top two
>> > as warnings at least.
>> >
>> > Is int-conversion turned on as part of any of the more general -W arguments
>> > (e.g. -Wall, -Wextra, -pedantic)? It's not listed in the manual and I was
>> > wondering
>> > if that was right or an oversight. Given this discussion, I would have
>> > expected it
>> > to be in -Wall.
>>
>> -Wint-conversion is enabled by default.  You get the warning whenever not
>> using -w or -Wno-int-conversion, and error with -pedantic-errors.
>
>
> Thanks. That isn't clear in the manual.

See https://gcc.gnu.org/onlinedocs/gcc/Invoking-GCC.html which says:

"Many options have long names starting with ‘-f’ or with ‘-W’—for
example, -fmove-loop-invariants, -Wformat and so on. Most of these
have both positive and negative forms; the negative form of -ffoo is
-fno-foo. This manual documents only one of these two forms, whichever
one is not the default. "

And the manual documents the -Wno-int-conversion form, because
-Wint-conversion is the default:
https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wno-int-conversion

Reply via email to