This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Implement -Wimplicit-fallthrough (version 8)
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Marek Polacek <polacek at redhat dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Joseph Myers <joseph at codesourcery dot com>, Jason Merrill <jason at redhat dot com>
- Date: Tue, 20 Sep 2016 16:34:43 +0200
- Subject: Re: Implement -Wimplicit-fallthrough (version 8)
- Authentication-results: sourceware.org; auth=none
- References: <20160901134049.GA3768@redhat.com> <20160909164444.GG2920@laptop.zalov.cz> <20160920142435.GE19950@redhat.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Tue, Sep 20, 2016 at 04:24:35PM +0200, Marek Polacek wrote:
> > (to skip over the koenig_p etc. cases) and fallthrough into the argument
> > handling and add another if (function == NULL_TREE) handling after that,
> > which would just build another internal call with the tsubsted arguments.
>
> I added the assert here, but I spent time implementing this, and it didn't
> really work, because without a testcase it was hard to say whether what I
> had was correct. E.g., how to determine the return type of the internal
> function, etc.
I agree that without the testcase it is hard and that assert is good enough
for now. For return type of the internal function, I'd just tsubst the
TREE_TYPE of the CALL_EXPR though.
Jakub