public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Paolo Carlini <paolo.carlini@oracle.com>
To: Andreas Schwab <schwab@suse.de>
Cc: "Paul Pluzhnikov" <ppluzhnikov@google.com>,
	"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 11:45:00 -0000	[thread overview]
Message-ID: <52402567.2080407@oracle.com> (raw)
In-Reply-To: <mvma9j35377.fsf@hawking.suse.de>

Hi,

thanks Andreas.

On 9/23/13 3:53 AM, Andreas Schwab wrote:
> Paul Pluzhnikov<ppluzhnikov@google.com>  writes:
>
>> Index: libstdc++-v3/src/c++11/snprintf_lite.cc
>> ===================================================================
>> --- libstdc++-v3/src/c++11/snprintf_lite.cc	(revision 0)
>> +++ libstdc++-v3/src/c++11/snprintf_lite.cc	(revision 0)
>> @@ -0,0 +1,152 @@
>> +// Debugging support -*- C++ -*-
>> +
>> +// Copyright (C) 2013 Free Software Foundation, Inc.
>> +//
>> +// This file is part of GCC.
>> +//
>> +// GCC is free software; you can redistribute it and/or modify
>> +// it under the terms of the GNU General Public License as published by
>> +// the Free Software Foundation; either version 3, or (at your option)
>> +// any later version.
>> +//
>> +// GCC is distributed in the hope that it will be useful,
>> +// but WITHOUT ANY WARRANTY; without even the implied warranty of
>> +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>> +// GNU General Public License for more details.
>> +//
>> +// Under Section 7 of GPL version 3, you are granted additional
>> +// permissions described in the GCC Runtime Library Exception, version
>> +// 3.1, as published by the Free Software Foundation.
>> +
>> +// You should have received a copy of the GNU General Public License and
>> +// a copy of the GCC Runtime Library Exception along with this program;
>> +// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
>> +//<http://www.gnu.org/licenses/>.
>> +
>> +#include<stdarg.h>
>> +#include<bits/functexcept.h>
>> +#include<bits/locale_facets.h>
>> +
>> +namespace std {
>> +  template<typename _CharT, typename _ValueT>
>> +  int
>> +  __int_to_char(_CharT* __bufend, _ValueT __v, const _CharT* __lit,
>> +                ios_base::fmtflags __flags, bool __dec);
>> +}
>> +
> m68k-linux/./libstdc++-v3/src/.libs/libstdc++.so: undefined reference to `int std::__int_to_char<char, unsigned int>(char*, unsigned int, char const*, std::_Ios_Fmtflags, bool)'
Paul, the *.cc are built with implicit instantiations disabled and we 
are missing explicit instantiations of this function template. If I 
remember correctly, we normally instantiate it in locale-inst.cc only 
for unsigned long and unsigned long long as second template argument. 
Thus, I would say, either make sure to use only those two in the new 
code, or add explicit instantiations. I would rather prefer the former, 
for example casting __val to (unsigned long long) in __concat_size_t 
isn't particularly elegant (vs for example checking if size_t isn't 
either unsigned long neither unsigned long long and adding an explicit 
instantiation only in that case) but would work I think. In any case, if 
it works for Andreas he is also preapproved to commit this kind change 
to unbreak his target.

Paolo.

  reply	other threads:[~2013-09-23 11:26 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 [this message]
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
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=52402567.2080407@oracle.com \
    --to=paolo.carlini@oracle.com \
    --cc=daniel.kruegler@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=libstdc++@gcc.gnu.org \
    --cc=ppluzhnikov@google.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).