public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: "McInerney, Ian S" <i.mcinerney17@imperial.ac.uk>
To: "fortran@gcc.gnu.org" <fortran@gcc.gnu.org>,
	"gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH 0/1] libgfortran: Fix compilation of gf_vsnprintf
Date: Fri, 12 Apr 2024 10:41:33 +0000	[thread overview]
Message-ID: <LO2P265MB4117773C45D9D6F71C253864CC042@LO2P265MB4117.GBRP265.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <20240404151632.3026631-1-i.mcinerney17@imperial.ac.uk>

Gentle ping. If this looks good, can someone commit to main (I don't have commit privileges). This is also something that could be considered for stable, since it's been around for many years.

-Ian




From: McInerney, Ian S <i.mcinerney17@imperial.ac.uk>
Sent: Thursday, April 4, 2024 4:16 PM
To: fortran@gcc.gnu.org <fortran@gcc.gnu.org>; gcc-patches@gcc.gnu.org <gcc-patches@gcc.gnu.org>
Cc: McInerney, Ian S <i.mcinerney17@imperial.ac.uk>
Subject: [PATCH 0/1] libgfortran: Fix compilation of gf_vsnprintf
 
The fallback function (gf_vsnprintf) to provide a vsnprintf function
if the system library doesn't have one would not compile due to the
variable name for the string's destination buffer not being updated
after the refactor in 2018 in edaaef601d0d6d263fba87b42d6d04c99dd23dba.

This updates the internal logic of gf_vsnprintf to now use the str
variable defined in the function signature.

I am not actually sure what configurations are using this fallback, since
it was added in 2018 and no patches have been made to fix this compilation
error. Testing this also isn't straightforward, and I had to do a bit of a
hack to get it to use the codepath to show the compilation error:
 1) Configure and build as normal to generate the config.h header
 2) Modify config.h directly to undefine HAVE_VSNPRINTF
 3) Directly call the libgfortran compilation step

Ian McInerney (1):
  libgfortran: Fix compilation of gf_vsnprintf

 libgfortran/runtime/error.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)


base-commit: b7bd2ec73d66f7487bc8842b24daecaa802a72e6
--
2.43.0


  parent reply	other threads:[~2024-04-12 10:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-04 15:16 Ian McInerney
2024-04-04 15:16 ` [PATCH 1/1] " Ian McInerney
2024-04-12 10:41 ` McInerney, Ian S [this message]
2024-04-12 11:53   ` [PATCH 0/1] " FX Coudert

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=LO2P265MB4117773C45D9D6F71C253864CC042@LO2P265MB4117.GBRP265.PROD.OUTLOOK.COM \
    --to=i.mcinerney17@imperial.ac.uk \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    /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).