This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: h8300-elf build broken


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]