From: Paul Pluzhnikov <ppluzhnikov@google.com>
To: Paolo Carlini <paolo.carlini@oracle.com>
Cc: "Andreas Schwab" <schwab@suse.de>,
"Daniel Krügler" <daniel.kruegler@gmail.com>,
"gcc-patches List" <gcc-patches@gcc.gnu.org>,
libstdc++ <libstdc++@gcc.gnu.org>
Subject: Re: [patch] Make vector::at() assertion message more useful (try #2)
Date: Mon, 23 Sep 2013 17:01:00 -0000 [thread overview]
Message-ID: <52406E7F.9050901@google.com> (raw)
In-Reply-To: <52406B4B.1070507@oracle.com>
On 9/23/13 9:24 AM, Paolo Carlini wrote:
>> Does this look right?
> Yes. Nit, in the comment I would also explicitly mention locale-inst.cc.
Done, submitted as r202836.
2013-09-23 Paul Pluzhnikov <ppluzhnikov@google.com>
* src/c++11/snprintf_lite.cc (__concat_size_t): Use
unsigned long long conditionally.
Index: libstdc++-v3/src/c++11/snprintf_lite.cc
===================================================================
--- libstdc++-v3/src/c++11/snprintf_lite.cc (revision 202832)
+++ libstdc++-v3/src/c++11/snprintf_lite.cc (working copy)
@@ -69,11 +69,17 @@
// Returns number of characters appended, or -1 if BUFSIZE is too small.
int __concat_size_t(char *__buf, size_t __bufsize, size_t __val)
{
+ // __int_to_char is explicitly instantiated and available only for
+ // some, but not all, types. See locale-inst.cc.
+#ifdef _GLIBCXX_USE_LONG_LONG
+ unsigned long long __val2 = __val;
+#else
+ unsigned long __val2 = __val;
+#endif
// Long enough for decimal representation.
- unsigned long long __val_ull = __val;
- int __ilen = 3 * sizeof(__val_ull);
+ int __ilen = 3 * sizeof(__val2);
char *__cs = static_cast<char*>(__builtin_alloca(__ilen));
- size_t __len = std::__int_to_char(__cs + __ilen, __val_ull,
+ size_t __len = std::__int_to_char(__cs + __ilen, __val2,
std::__num_base::_S_atoms_out,
std::ios_base::dec, true);
if (__bufsize < __len)
next prev parent reply other threads:[~2013-09-23 16:38 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-04 20:53 Paul Pluzhnikov
2013-09-04 21:10 ` Daniel Krügler
2013-09-04 23:17 ` Paul Pluzhnikov
2013-09-05 4:55 ` Daniel Krügler
2013-09-13 5:19 ` Paul Pluzhnikov
2013-09-13 10:52 ` Paolo Carlini
2013-09-18 20:30 ` Paul Pluzhnikov
2013-09-18 23:24 ` Paolo Carlini
2013-09-22 10:19 ` Paul Pluzhnikov
2013-09-23 11:09 ` Andreas Schwab
2013-09-23 11:45 ` Paolo Carlini
2013-09-23 12:54 ` Richard Biener
2013-09-23 12:59 ` Andreas Schwab
2013-09-23 13:40 ` Paolo Carlini
2013-09-23 13:42 ` Andreas Schwab
2013-09-23 14:12 ` Paolo Carlini
2013-09-23 14:12 ` Marc Glisse
2013-09-23 14:12 ` Jakub Jelinek
2015-04-06 11:37 ` [wwwdocs] Testing C++ changes (was: [patch] Make vector::at() assertion message more useful) Gerald Pfeifer
2015-04-06 14:06 ` [wwwdocs] Testing C++ changes Jason Merrill
2013-09-23 15:18 ` [patch] Make vector::at() assertion message more useful (try #2) Paul Pluzhnikov
2013-09-23 15:26 ` Paolo Carlini
2013-09-23 16:38 ` Paul Pluzhnikov
2013-09-23 17:00 ` Paolo Carlini
2013-09-23 17:01 ` Paul Pluzhnikov [this message]
2013-09-23 16:21 ` Paul Pluzhnikov
2013-09-04 23:26 ` Paolo Carlini
2013-09-04 23:36 ` Paul Pluzhnikov
2013-09-04 23:44 ` Paolo Carlini
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=52406E7F.9050901@google.com \
--to=ppluzhnikov@google.com \
--cc=daniel.kruegler@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=libstdc++@gcc.gnu.org \
--cc=paolo.carlini@oracle.com \
--cc=schwab@suse.de \
/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).