From: Richard Biener <richard.guenther@gmail.com>
To: Richard Biener <richard.guenther@gmail.com>,
Bernd Schmidt <bschmidt@redhat.com>,
GCC Patches <gcc-patches@gcc.gnu.org>,
richard.sandiford@arm.com
Subject: Re: Robustify REAL_MODE_FORMAT
Date: Fri, 30 Oct 2015 09:02:00 -0000 [thread overview]
Message-ID: <CAFiYyc3E3KJRuWa8aQChDaSL5Hrd_Cy5f=idEB2p5GV1As0xLw@mail.gmail.com> (raw)
In-Reply-To: <871tcdtz2v.fsf@e105548-lin.cambridge.arm.com>
On Thu, Oct 29, 2015 at 5:32 PM, Richard Sandiford
<richard.sandiford@arm.com> wrote:
> Richard Biener <richard.guenther@gmail.com> writes:
>> On October 29, 2015 4:33:17 PM GMT+01:00, Bernd Schmidt
>> <bschmidt@redhat.com> wrote:
>>>On 10/29/2015 04:30 PM, Richard Sandiford wrote:
>>>> Make sure that REAL_MODE_FORMAT aborts if it is passed an invalid
>>>mode,
>>>> rather than stepping beyond the bounds of an array. It turned out
>>>that
>>>> some code was passing non-float modes to the real.h routines.
>>>
>>>> gcc/
>>>> * real.h (REAL_MODE_FORMAT): Abort if the mode isn't a
>>>> SCALAR_FLOAT_MODE_P.
>>>
>>>I'm assuming that the code you mention has already been fixed so that
>>>we
>>>don't trigger the abort. Ok.
>>
>> Rather than the weird macro can't we turn real_mode_format to an inline
>> function?
>
> It needs to be an lvalue for things like:
>
> REAL_MODE_FORMAT (TFmode) = &ibm_extended_format;
>
> I suppose we could return a non-const reference, but I'd rather stay
> clear of returning those :-)
Yes please. But SET_REAL_MODE_FORMAT (TFmode, &ibm_extended_format)
would work as well.
Richard.
> Thanks,
> Richard
>
prev parent reply other threads:[~2015-10-30 8:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-29 15:33 Richard Sandiford
2015-10-29 15:37 ` Bernd Schmidt
2015-10-29 16:29 ` Richard Biener
2015-10-29 16:33 ` Richard Sandiford
2015-10-30 9:02 ` Richard Biener [this message]
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='CAFiYyc3E3KJRuWa8aQChDaSL5Hrd_Cy5f=idEB2p5GV1As0xLw@mail.gmail.com' \
--to=richard.guenther@gmail.com \
--cc=bschmidt@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=richard.sandiford@arm.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).