limix / bgen

A BGEN file format reader.
MIT License
10 stars 2 forks source link

Cast to fix compile error in C++ builds #15

Closed dcdehaas closed 2 months ago

dcdehaas commented 8 months ago

When including bgen.h in C++ code the compiler complains about implicit casts from void*. These implicit casts are fine in .c files, since the C compiler is building those. The alternative to making the cast explicit would be to compile all C++ translation units with -fpermissive, if they include bgen.h (but this can supress useful compiler errors).

I considered making a unit test for this (which would fail to compile if a header file added such an implicit cast in the future), but that would add a dependency on having a C++ compiler to build the library.

horta commented 2 months ago

Since your fix is for C++ I will consider that as not a problem to fix.