This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/58804] dynamic_bitset<> uses popcountl on long long
- From: "glisse at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 20 Oct 2013 04:16:40 +0000
- Subject: [Bug libstdc++/58804] dynamic_bitset<> uses popcountl on long long
- Auto-submitted: auto-generated
- References: <bug-58804-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58804
--- Comment #8 from Marc Glisse <glisse at gcc dot gnu.org> ---
(In reply to Ed Smith-Rowland from comment #7)
> I have word_type to be any unsigned integral. I don't see why either
> 'unsigned int' or 'unsigned __int128' would be a problem.
>
> Except for the bit .... Oh shit. I need template versions of the bit
> builtins. Never mind my last patch.
Moving to popcountll / ctzll seems good to me and will still work for smaller
sizes (ctz would only differ for 0, but that's already undefined, it is clz
that really differs, strange that you don't need that one anywhere), so it
makes sense to me to start with that patch. You can always consider the
unimportant __int128 case later.
> I actually wish they would standardize these.
Several people, including Howard, seemed strongly in favor of it, but I don't
know if anyone is writing a paper.