public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Sam James <sam@gentoo.org>
To: Florian Weimer <fweimer@redhat.com>
Cc: Sam James <sam@gentoo.org>,
	gcc-patches@gcc.gnu.org, jason@redhat.com, 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: Wed, 15 Nov 2023 05:13:55 +0000	[thread overview]
Message-ID: <87msvfmwci.fsf@gentoo.org> (raw)
In-Reply-To: <87v8a3txar.fsf@oldenburg.str.redhat.com>


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.

>
> I expect system headers are quite clean actually because they have to be
> for C++ compatibility.  Some things have improved in the last 25 years.
>

Oh, duh. Thank you!



  reply	other threads:[~2023-11-15  5:14 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 [this message]
2023-11-21 21:18         ` Jason Merrill
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=87msvfmwci.fsf@gentoo.org \
    --to=sam@gentoo.org \
    --cc=fweimer@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jason@redhat.com \
    --cc=jeffreyalaw@gmail.com \
    --cc=joseph@codesourcery.com \
    /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).