From: Thomas Schwinge <thomas@codesourcery.com>
To: Florian Weimer <fweimer@redhat.com>
Cc: <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH 2/6] c: Turn int-conversion warnings into permerrors
Date: Fri, 1 Dec 2023 12:29:51 +0100 [thread overview]
Message-ID: <874jh25ff4.fsf@euler.schwinge.homeip.net> (raw)
In-Reply-To: <5b20c39f10a387650728861d055eebb6774eb876.1699879818.git.fweimer@redhat.com>
Hi Florian!
On 2023-11-13T14:10:34+0100, Florian Weimer <fweimer@redhat.com> wrote:
> --- a/gcc/c/c-typeck.cc
> +++ b/gcc/c/c-typeck.cc
> @@ -7616,27 +7639,28 @@ convert_for_assignment (location_t location, location_t expr_loc, tree type,
> case ic_assign:
> - pedwarn (location, OPT_Wint_conversion,
> - "assignment to %qT from %qT makes pointer from integer "
> - "without a cast", type, rhstype);
> + pedpermerror (location, OPT_Wint_conversion,
> + "assignment to %qT from %qT makes pointer from "
> + "integer without a cast", type, rhstype);
> break;
In addition to the many ones that you've fixed, there's one more:
[-PASS:-]{+FAIL:+} gcc.dg/graphite/pr83126.c (test for excess errors)
[...]/testsuite/gcc.dg/graphite/pr83126.c: In function 'ew':
[...]/testsuite/gcc.dg/graphite/pr83126.c:15:10: error: assignment to 'int *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
Presumably your testing didn't have Graphite enabled due to missing
host libisl? However, you should be able to reproduce without that:
$ build-gcc/gcc/xgcc -Bbuild-gcc/gcc/ source-gcc/gcc/testsuite/gcc.dg/graphite/pr83126.c
source-gcc/gcc/testsuite/gcc.dg/graphite/pr83126.c: In function ‘ew’:
source-gcc/gcc/testsuite/gcc.dg/graphite/pr83126.c:15:10: error: assignment to ‘int *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
15 | fd = *fd;
| ^
I'm not proposing a patch as I don't know whether you'd like to just
silence the diagnostic, fix (?) the test case, and/or add another
'dg-error'-checking test case? (I've not yet looked at the history of
the test case.)
Grüße
Thomas
-----------------
Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955
next prev parent reply other threads:[~2023-12-01 11:29 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-13 13:09 [PATCH 0/6] Turn some C warnings into errors by default Florian Weimer
2023-11-13 13:09 ` [PATCH 1/6] c-family: Introduce pedpermerror Florian Weimer
2023-11-13 19:22 ` Jeff Law
2023-11-14 7:39 ` Florian Weimer
2023-11-13 13:10 ` [PATCH 2/6] c: Turn int-conversion warnings into permerrors Florian Weimer
2023-11-13 19:24 ` Jeff Law
2023-11-13 19:44 ` [PATCH 2/6] c: Turn int-conversion warnings into permerrors [PR106416] Sam James
2023-12-01 11:29 ` Thomas Schwinge [this message]
2023-12-01 11:36 ` [PATCH 2/6] c: Turn int-conversion warnings into permerrors Florian Weimer
2023-11-13 13:10 ` [PATCH 3/6] c: Turn -Wimplicit-function-declaration into a pedpermerror Florian Weimer
2023-11-13 19:25 ` Jeff Law
2023-11-13 19:42 ` [PATCH 3/6] c: Turn -Wimplicit-function-declaration into a pedpermerror [PR91092] Sam James
2023-11-13 13:11 ` [PATCH 4/6] c: Turn -Wimplicit-int into a pedpermerror Florian Weimer
2023-11-13 19:26 ` Jeff Law
2023-11-13 19:45 ` [PATCH 4/6] c: Turn -Wimplicit-int into a pedpermerror [PR91093] Sam James
2023-11-13 13:11 ` [PATCH 5/6] c: Turn -Wreturn-mismatch into a pedpermerror Florian Weimer
2023-11-13 19:28 ` Jeff Law
2023-11-13 13:11 ` [PATCH 6/6] c: Turn -Wincompatible-pointer-types " Florian Weimer
2023-11-13 19:30 ` Jeff Law
2023-11-13 19:44 ` [PATCH 0/6] Turn some C warnings into errors by default Sam James
2023-12-02 0:33 [PATCH 2/6] c: Turn int-conversion warnings into permerrors 钟居哲
2023-12-02 1:10 ` Patrick O'Neill
2023-12-02 1:53 ` 钟居哲
2023-12-02 3:25 ` Patrick O'Neill
2023-12-02 1:13 ` Sam James
2023-12-02 3:40 ` Jeff Law
2023-12-02 5:47 ` Sam James
2023-12-02 15:19 ` Jeff Law
2023-12-04 7:45 ` Kito Cheng
2023-12-05 0:25 ` Kito Cheng
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=874jh25ff4.fsf@euler.schwinge.homeip.net \
--to=thomas@codesourcery.com \
--cc=fweimer@redhat.com \
--cc=gcc-patches@gcc.gnu.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).