From: Siddhesh Poyarekar <siddhesh@sourceware.org>
To: Richard Biener <richard.guenther@gmail.com>,
gcc-patches@gcc.gnu.org, David Malcolm <dmalcolm@redhat.com>
Subject: Re: [PATCH] Fix bogus function cast warning for functions with common arg subset
Date: Fri, 23 Feb 2018 18:52:00 -0000 [thread overview]
Message-ID: <6b766ed9-1da3-7712-1d0c-1a50f2c44d38@sourceware.org> (raw)
In-Reply-To: <A8640872-D757-4552-94D2-AEEB1B6076B2@gmail.com>
On Saturday 24 February 2018 12:01 AM, Richard Biener wrote:
> I don't see how the function cast is valid.
>
> I've argued for void (*) () to/from void (*) (int), etc. In the past and that was shot down similarly. This looks like exactly the same thing.
That should not throw a warning because void (*) (void) is used as a
wildcard to match all functions. My understanding from the discussions
around the patch implementation was that these are heuristics and are
not meant to catch all cases anyway. In such a scenario it might be
prudent to avoid breaking behaviour that many programs seem to assume.
Siddhesh
next prev parent reply other threads:[~2018-02-23 18:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-23 3:40 Siddhesh Poyarekar
2018-02-23 15:50 ` David Malcolm
2018-02-23 16:12 ` Siddhesh Poyarekar
2018-02-23 18:31 ` Richard Biener
2018-02-23 18:52 ` Siddhesh Poyarekar [this message]
2018-02-23 20:02 ` Martin Sebor
2018-02-23 20:32 ` Siddhesh Poyarekar
2018-02-23 21:58 ` Martin Sebor
2018-02-26 6:55 ` Siddhesh Poyarekar
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=6b766ed9-1da3-7712-1d0c-1a50f2c44d38@sourceware.org \
--to=siddhesh@sourceware.org \
--cc=dmalcolm@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=richard.guenther@gmail.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).