This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [OpenACC 2/11] PTX backend changes
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Bernd Schmidt <bschmidt at redhat dot com>
- Cc: Nathan Sidwell <nathan at acm dot org>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Jason Merrill <jason at redhat dot com>, "Joseph S. Myers" <joseph at codesourcery dot com>
- Date: Thu, 22 Oct 2015 16:32:15 +0200
- Subject: Re: [OpenACC 2/11] PTX backend changes
- Authentication-results: sourceware.org; auth=none
- References: <5627DD78 dot 9040302 at acm dot org> <5627E303 dot 5050701 at acm dot org> <5628ECE5 dot 6080901 at redhat dot com> <5628F1A9 dot 50803 at acm dot org> <5628F281 dot 7070309 at redhat dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Thu, Oct 22, 2015 at 04:28:17PM +0200, Bernd Schmidt wrote:
> On 10/22/2015 04:24 PM, Nathan Sidwell wrote:
> >>>+ else
> >>>+ { /* Parent will skip this parallel itself. */ }
> >>
> >>Here too - actually no need to have an empty else at all.
> >
> >I wanted somewhere clear for the comment to go. (Actually, I think this
> >is the one the compiler warns about -- empty dangling else).
>
> Don't recall such a warning, but that doesn't mean it isn't there. About the
> comment, it could either go just after the if, or above it, along the lines
> of
There is a warning for
if (cond);
but not for
if (cond)
;
or
if (cond)
/* comment */ ;
which is the style used in various places throughout the compiler.
> /* We handle cases X, Y, Z here. If none of them apply, then
> the parent will skip this parallel itself. */
>
> In this particular loop you could also use continue; for the empty if
> conditions.
Jakub