This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [OpenACC 1/11] UNIQUE internal function
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Nathan Sidwell <nathan at acm dot org>
- Cc: Richard Biener <richard dot guenther at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Bernd Schmidt <bschmidt at redhat dot com>, Jason Merrill <jason at redhat dot com>, "Joseph S. Myers" <joseph at codesourcery dot com>
- Date: Tue, 27 Oct 2015 15:06:09 +0100
- Subject: Re: [OpenACC 1/11] UNIQUE internal function
- Authentication-results: sourceware.org; auth=none
- References: <CAFiYyc3f1zdjZo7WyMHPXZkxNYbfVXa+2N8wMuB4fxKxtEiwDA at mail dot gmail dot com> <562925BE dot 805 at acm dot org> <20151023082545 dot GA478 at tucnak dot redhat dot com> <562A2EAD dot 2020802 at acm dot org> <20151023130313 dot GG478 at tucnak dot redhat dot com> <562CE4C1 dot 3090705 at acm dot org> <562EAA0D dot 4040203 at acm dot org> <20151027080332 dot GB478 at tucnak dot redhat dot com> <CAFiYyc2B24MK0y2se7swtH9zwbqRv1BXzNdx6S1L699tV13LCA at mail dot gmail dot com> <562F843C dot 8070207 at acm dot org>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Tue, Oct 27, 2015 at 07:03:40AM -0700, Nathan Sidwell wrote:
> On 10/27/15 06:45, Richard Biener wrote:
> >On Tue, Oct 27, 2015 at 9:03 AM, Jakub Jelinek <jakub@redhat.com> wrote:
>
> >>Ok for me, but please wait for Richi's ack too.
> >
> >+ /* An IFN_UNIQUE call must be duplicated as part of its group,
> >+ or not at all. */
> >+ if (is_gimple_call (g) && gimple_call_internal_p (g)
> >+ && gimple_call_internal_unique_p (g))
> >
> >&&s always to the next line
>
> oh, did not know that.
I believe the general rule is if all the conditions are short enough
that everything fits on a single line, you can write it as
if (a && b && c && d)
but as soon as you need to wrap, it should be one && per line, so
if (a
&& b
&& c
&& d)
style in that case rather than
if (a && b
&& c && d)
But, lots of code doesn't do it this way.
Jakub