Compile errors in C++ from 4.3.0 onwards

5 views
Skip to first unread message

Martin Fuller

unread,
Jun 4, 2025, 11:06:09 PMJun 4
to Roaring Bitmaps
I get compile errors in C++ using any Github release from Version 4.3.0 onwards, using demo.cpp from the "Quick Start" section.  See below.  It is the same errors using both GCC 12.4 (Cygwin) and Visual Studio 2022.  Version 4.2.3 and earlier are ok.

There are other errors in Visual Studio but I can work round these.  Visual Studio doesn't like the first parentheses from lines like: "return (art_indexed_child_t){0, 0, 0};"  The error message is: "a parenthesized type followed by an initializer list is a non-standard explicit type conversion syntax".  Workaround is to remove the parens: "return art_indexed_child_t{0, 0, 0};"


$ g++ -std=gnu++20 -o demopp demo.cpp
In file included from demo.cpp:3:
roaring.c: In function ‘void roaring::api::extend_containers(roaring64_bitmap_t*)’:
roaring.c:24537:24: error: invalid conversion from ‘void*’ to ‘roaring::internal::container_t**’ {aka ‘roaring::api::container_s**’} [-fpermissive]
24537 |         roaring_realloc(r->containers, new_capacity * sizeof(container_t *));
      |         ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                        |
      |                        void*
roaring.c: In function ‘size_t roaring::api::roaring64_bitmap_shrink_to_fit(roaring64_bitmap_t*)’:
roaring.c:25394:40: error: invalid conversion from ‘void*’ to ‘roaring::internal::container_t**’ {aka ‘roaring::api::container_s**’} [-fpermissive]
25394 |         r->containers = roaring_realloc(r->containers,
      |                         ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
      |                                        |
      |                                        void*
25395 |                                         new_capacity * sizeof(container_t *));
      |                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
roaring.c: In function ‘roaring::api::roaring64_bitmap_t* roaring::api::roaring64_bitmap_frozen_view(const char*, size_t)’:
roaring.c:26861:9: error: cannot convert ‘roaring::internal::container_t*’ {aka ‘roaring::api::container_s*’} to ‘roaring::internal::container_t**’ {aka ‘roaring::api::container_s**’} in assignment
26861 |         (container_t *)roaring_malloc(r->capacity * sizeof(container_t *));
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |         |
      |         roaring::internal::container_t* {aka roaring::api::container_s*}


Daniel Lemire

unread,
Jun 4, 2025, 11:15:29 PMJun 4
to Martin Fuller, Roaring Bitmaps
Good day Martin,

Please report build errors at 


Otherwise it is too hard to track them.

Note that you should distinguish warnings from errors. The warning you report there seems purely speculative on the part of VS and not indicative of an error.



--
You received this message because you are subscribed to the Google Groups "Roaring Bitmaps" group.
To unsubscribe from this group and stop receiving emails from it, send an email to roaring-bitma...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/roaring-bitmaps/983d4095-2d5d-446f-a4a9-5a55324a0892n%40googlegroups.com.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages