public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Segher Boessenkool <segher@kernel.crashing.org>
To: Jakub Jelinek <jakub@redhat.com>
Cc: "Kewen.Lin" <linkw@linux.ibm.com>,
	GCC Patches <gcc-patches@gcc.gnu.org>,
	 Bill Schmidt <wschmidt@linux.ibm.com>
Subject: Re: [PATCH] Fix PR94401 by considering reverse overrun
Date: Thu, 2 Apr 2020 07:05:04 -0500	[thread overview]
Message-ID: <20200402120504.GC26902@gate.crashing.org> (raw)
In-Reply-To: <20200402082834.GO2212@tucnak>

Hi!

On Thu, Apr 02, 2020 at 10:28:34AM +0200, Jakub Jelinek wrote:
> > +			tree offset = dataref_offset
> > +					? dataref_offset
> > +					: build_int_cst (ref_type, 0);
> 
> The above is misformatted.  The ? and : shouldn't be indented further than
> the dataref_offset, but usually e.g. for the sake of emacs we add ()s around
> the expression in this case.  So:
> 			tree offset = (dataref_offset
> 				       ? dataref_offset
> 				       : build_int_cst (ref_type, 0));
> or
> 			tree offset
> 			  = (dataref_offset
> 			     ? dataref_offset : build_int_cst (ref_type, 0));

Or even just the (less obfuscated imnsho)

			tree offset = dataref_offset;
			if (!offset)
			  offset = build_int_cst (ref_type, 0);

which even is shorter!


Segher

  parent reply	other threads:[~2020-04-02 12:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-02  7:15 Kewen.Lin
2020-04-02  8:28 ` Jakub Jelinek
2020-04-02 10:07   ` Kewen.Lin
2020-04-02 10:39     ` Jakub Jelinek
2020-04-02 12:05   ` Segher Boessenkool [this message]
2020-04-02  9:21 ` Richard Biener
2020-04-02 10:33   ` Kewen.Lin

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=20200402120504.GC26902@gate.crashing.org \
    --to=segher@kernel.crashing.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=linkw@linux.ibm.com \
    --cc=wschmidt@linux.ibm.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).