public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Martin Sebor <msebor@gmail.com>
To: Jonathan Wakely <jwakely@redhat.com>,
	libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org
Subject: Re: [committed] libstdc++: Only use __builtin_sprintf if supported [PR 96083]
Date: Wed, 16 Dec 2020 09:23:37 -0700	[thread overview]
Message-ID: <549ebfb8-8f07-4b00-b8d9-2d2cf2ea0961@gmail.com> (raw)
In-Reply-To: <20201216150002.GA1055262@redhat.com>

On 12/16/20 8:00 AM, Jonathan Wakely via Gcc-patches wrote:
> Clang doesn't support __builtin_sprintf, so use std::sprintf instead.
> 
> libstdc++-v3/ChangeLog:
> 
> 	PR libstdc++/96083
> 	* include/ext/throw_allocator.h: Use __has_builtin to check for
> 	__builtin_sprintf support, and use std::sprtinf if necessary.
> 
> Tested powerpc64le-linux. Committed to trunk.
> 

I expected to see the test itself guarded by #ifdef __has_builtin
like in <utility>.  Or is this code only [meant to be] used with
compilers that understand __has_builtin?  (I'm mostly just curious
here about support for other compilers like ICC, not necessarily
pointing out a problem with the patch.)

Martin

  reply	other threads:[~2020-12-16 16:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-16 15:00 Jonathan Wakely
2020-12-16 16:23 ` Martin Sebor [this message]
2020-12-16 17:02   ` Jonathan Wakely
2020-12-16 17:04     ` Jonathan Wakely
2020-12-16 18:18       ` Martin Sebor
2020-12-16 19:28     ` Jonathan Wakely

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=549ebfb8-8f07-4b00-b8d9-2d2cf2ea0961@gmail.com \
    --to=msebor@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jwakely@redhat.com \
    --cc=libstdc++@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).