public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jason Merrill <jason@redhat.com>
To: Sam James <sam@gentoo.org>, Florian Weimer <fweimer@redhat.com>
Cc: gcc-patches@gcc.gnu.org, jeffreyalaw@gmail.com, joseph@codesourcery.com
Subject: Re: [PATCH v2 5/8] c: Do not ignore some forms of -Wimplicit-int in system headers
Date: Tue, 21 Nov 2023 16:18:33 -0500	[thread overview]
Message-ID: <a1339338-e8b3-46b3-aa2f-2f14cb44138a@redhat.com> (raw)
In-Reply-To: <87msvfmwci.fsf@gentoo.org>

On 11/15/23 00:13, Sam James wrote:
> Florian Weimer <fweimer@redhat.com> writes:
>> * Sam James:
>>> Florian Weimer <fweimer@redhat.com> writes:
>>>
>>>> Most -Wimplicit-int warnings were unconditionally disabled for system
>>>> headers.  Only missing types for parameters in old-style function
>>>> definitions resulted in warnings.  This is inconsistent with the
>>>> treatment of other permerrors, which are active in system headers.
>>>
>>> The situation with system headers is kind of a mess still. I went
>>> looking for a bug for the -Wimplicit-int behaviour but I only found
>>> PR78000 for -Wimplicit-function-declaration. But in the bug, Joseph
>>> makes the same observation.
>>>
>>> I don't suppose he'll want to block on that at this late point though.
>>>
>>> Do you know offhand what Clang's behaviour is wrt warnings in system
>>> headers?
>>
>> Clang ignores these new errors in system headers by default.  I don't
>> know if that's deliberate or a bug.  Our permerrors are deliberately
>> active in system headers.  As the test shows, -Wimplicit-int really was
>> the outlier here because of that check outside the permerror machinery.
> 
> Thanks - my assumption was that it was more widespread because of a few
> lingering bugs I've seen a few projects complain about, but maybe they
> were using old versions or similar.

The permerror behavior was chosen for C++, which was the only front-end 
that used it before; we might want to reconsider if this patch set runs 
into problems with system C headers.

Jason


  reply	other threads:[~2023-11-21 21:18 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-14 17:50 [PATCH v2 0/8] Turn some C warnings into errors by default Florian Weimer
2023-11-14 17:50 ` [PATCH v2 1/8] Add tests for validating future C permerrors Florian Weimer
2023-11-14 17:50 ` [PATCH v2 2/8] c: Turn int-conversion warnings into permerrors Florian Weimer
2023-11-14 17:50 ` [PATCH v2 3/8] c: Turn -Wimplicit-function-declaration into a permerror Florian Weimer
2023-11-14 17:50 ` [PATCH v2 4/8] c: Turn -Wimplicit-int " Florian Weimer
2023-11-14 17:50 ` [PATCH v2 5/8] c: Do not ignore some forms of -Wimplicit-int in system headers Florian Weimer
2023-11-15  5:03   ` Sam James
2023-11-15  5:12     ` Florian Weimer
2023-11-15  5:13       ` Sam James
2023-11-21 21:18         ` Jason Merrill [this message]
2023-11-14 17:50 ` [PATCH v2 6/8] c: Turn -Wreturn-mismatch into a permerror Florian Weimer
2023-11-14 17:50 ` [PATCH v2 7/8] c: Turn -Wincompatible-pointer-types " Florian Weimer
2023-11-14 17:50 ` [PATCH v2 8/8] c: Add new -Wdeclaration-missing-parameter-type permerror Florian Weimer
2023-11-14 20:26   ` Marek Polacek
2023-11-14 22:27     ` Florian Weimer
2023-11-15  5:16 ` [PATCH v2 0/8] Turn some C warnings into errors by default Sam James
2023-11-15  6:37   ` Florian Weimer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a1339338-e8b3-46b3-aa2f-2f14cb44138a@redhat.com \
    --to=jason@redhat.com \
    --cc=fweimer@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jeffreyalaw@gmail.com \
    --cc=joseph@codesourcery.com \
    --cc=sam@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).