From: Mark Eggleston <mark.eggleston@codethink.co.uk>
To: Jakub Jelinek <jakub@redhat.com>
Cc: Fritz Reese <fritzoreese@gmail.com>,
fortran <fortran@gcc.gnu.org>,
gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH, Fortran] pad char to int conversions with spaces instead of zeros (legacy)
Date: Wed, 12 Dec 2018 15:12:00 -0000 [thread overview]
Message-ID: <ac2ce3fd-67ba-b8dd-417d-2d6777c2281e@codethink.co.uk> (raw)
In-Reply-To: <e0dbf769-a68f-0bab-1284-a63fcf45858b@codethink.co.uk>
On 12/12/2018 12:06, Mark Eggleston wrote:
> I'm about to build the compiler with
>
> Â memset (buffer, 0x20, buffer_size);
>
> instead of
>
> Â memset (buffer, (flag_dec_pad_with_spaces ? 0x20 : 0x0), buffer_size);
>
> and will check again, if necessary a padding variable can be used
> instead initially set to zero and changed to 0x20 when it is known
> that the source is character.
It was indeed necessary to only use 0x20 for padding when the source is
known to be character. One more check was to transfer a character(4)
variable to an integer(8) variable, there is no space padding. I don't
yet know whether this matches the behaviour of other compilers.
I don't currently have access to other compilers. I can have some test
cases performed on xlf and SunStudio but won't get any answers until
after Christmas. The answer will determine whether I have any more work
to do.
Mark
--
https://www.codethink.co.uk/privacy.html
next prev parent reply other threads:[~2018-12-12 15:12 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-04 14:47 Mark Eggleston
2018-12-04 15:11 ` Jakub Jelinek
2018-12-04 17:04 ` Fritz Reese
2018-12-06 2:27 ` Jerry DeLisle
2018-12-06 10:50 ` Jakub Jelinek
2018-12-06 10:54 ` Mark Eggleston
2018-12-07 1:57 ` Jerry DeLisle
2018-12-06 10:34 ` Mark Eggleston
2018-12-10 14:09 ` Mark Eggleston
2018-12-10 17:12 ` Jakub Jelinek
2018-12-10 19:44 ` Fritz Reese
2018-12-12 11:37 ` Mark Eggleston
2018-12-12 11:53 ` Jakub Jelinek
2018-12-12 12:06 ` Mark Eggleston
2018-12-12 12:12 ` Jakub Jelinek
2018-12-12 15:12 ` Mark Eggleston [this message]
2018-12-06 10:23 ` Mark Eggleston
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=ac2ce3fd-67ba-b8dd-417d-2d6777c2281e@codethink.co.uk \
--to=mark.eggleston@codethink.co.uk \
--cc=fortran@gcc.gnu.org \
--cc=fritzoreese@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@redhat.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).