This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: h8300-elf build broken
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: DJ Delorie <dj at redhat dot com>
- Cc: gcc at gcc dot gnu dot org, "libstdc++" <libstdc++ at gcc dot gnu dot org>
- Date: Tue, 8 May 2012 18:24:05 -0500
- Subject: Re: h8300-elf build broken
- References: <201205082214.q48ME8nc017484@greed.delorie.com>
On Tue, May 8, 2012 at 5:14 PM, DJ Delorie <dj@redhat.com> wrote:
>
> I assume this is a size_t vs int type problem, but the diagnostic
> points to the function declaration, not to an actual binary
> expression, and I can't figure out what it's complaining about:
My mailer uses proportional fonts so I can't make sense of the
diagnostics with the carets :-/
>
> Note: my current patchset is:
>
> Index: libstdc++-v3/include/std/bitset
> ===================================================================
> --- libstdc++-v3/include/std/bitset ? ? (revision 186562)
> +++ libstdc++-v3/include/std/bitset ? ? (working copy)
> @@ -1374,13 +1374,13 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
> ? ? ? void
> ? ? ? bitset<_Nb>::
> ? ? ? _M_copy_from_ptr(const _CharT* __s, size_t __len,
> ? ? ? ? ? ? ? ? ? ? ? size_t __pos, size_t __n, _CharT __zero, _CharT __one)
> ? ? ? {
> ? ? ? ?reset();
> - ? ? ? const size_t __nbits = std::min(_Nb, std::min(__n, __len - __pos));
> + ? ? ? const size_t __nbits = std::min(_Nb, std::min(__n, (size_t)(__len - __pos)));
style nits: It should be size_t(__len - __pos), and not (size_t)(__len - __pos).
Same for the other hunk. Patch OK with those changes.
-- Gaby