This is the mail archive of the
mailing list for the GCC project.
Re: [patch] Make vector::at() assertion message more useful (try #2)
- From: Andreas Schwab <schwab at suse dot de>
- To: Paolo Carlini <paolo dot carlini at oracle dot com>
- Cc: Paul Pluzhnikov <ppluzhnikov at google dot com>, Daniel KrÃgler <daniel dot kruegler at gmail dot com>, gcc-patches List <gcc-patches at gcc dot gnu dot org>, libstdc++ <libstdc++ at gcc dot gnu dot org>
- Date: Mon, 23 Sep 2013 13:45:50 +0200
- Subject: Re: [patch] Make vector::at() assertion message more useful (try #2)
- Authentication-results: sourceware.org; auth=none
- References: <ye6qhae0qpf8 dot fsf at elbrus2 dot mtv dot corp dot google dot com> <CAGNvRgDfHf6pYmBYC66HHhj6RobhiaiAAVEKj1FDxSWGxbYFTg at mail dot gmail dot com> <CALoOobMf3u8R_DVW5b2eRy05fBpB5unhriLMYdUEkT_E3DwtaA at mail dot gmail dot com> <CAGNvRgD6mK=-n7QhK=-NtfXZHOpCniXKc-riWUNfqZeVa8xufQ at mail dot gmail dot com> <CALoOobO6XEsrSM6jJFCQ=n00iY8qM=eujs-=LixNZyuya5f-cA at mail dot gmail dot com> <5232E2AF dot 4000106 at oracle dot com> <CALoOobMejGJLVVCszP8Joa+4B21UbvK4chyFUnjiCNPP0GJF0A at mail dot gmail dot com> <mvma9j35377 dot fsf at hawking dot suse dot de> <52402567 dot 2080407 at oracle dot com>
Paolo Carlini <email@example.com> writes:
> 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)
What's wrong with always adding the instantiation?
> 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.
There are a lot of targets using unsigned int for size_t, which would
have been uncovered by proper testing.
Andreas Schwab, SUSE Labs, firstname.lastname@example.org
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."