vbz_compression
vbz_compression copied to clipboard
compile failure with recent GCC
Attempting to build the bioconda package - with 1.0.13 (and prior versions), GNU 13.3.0 yields an error preventing compilation:
14:49:26 BIOCONDA INFO (OUT) /opt/conda/conda-bld/ont_vbz_hdf_plugin_1740408436260/work/vbz/vbz.cpp: In function 'vbz_size_t vbz_decompressed_size(const void*, vbz_size_t, const CompressionOptions*)':
14:49:26 BIOCONDA INFO (OUT) /opt/conda/conda-bld/ont_vbz_hdf_plugin_1740408436260/work/vbz/vbz.cpp:384:17: error: possibly dangling reference to a temporary [-Werror=dangling-reference]
14:49:26 BIOCONDA INFO (OUT) 384 | auto const& source_header = source_buffer.subspan(0, sizeof(VbzSizedHeader)).as_span<VbzSizedHeader const>()[0];
14:49:26 BIOCONDA INFO (OUT) | ^~~~~~~~~~~~~
14:49:26 BIOCONDA INFO (OUT) /opt/conda/conda-bld/ont_vbz_hdf_plugin_1740408436260/work/vbz/vbz.cpp:384:115: note: the temporary was destroyed at the end of the full expression 'source_buffer.gsl::span<const char>::subspan(0, sizeof ({anonymous}::VbzSizedHeader)).gsl::span<const char>::as_span<const {anonymous}::VbzSizedHeader>().gsl::span<const {anonymous}::VbzSizedHeader>::operator[](0)'
14:49:26 BIOCONDA INFO (OUT) 384 | auto const& source_header = source_buffer.subspan(0, sizeof(VbzSizedHeader)).as_span<VbzSizedHeader const>()[0];
14:49:26 BIOCONDA INFO (OUT) | ^
14:49:26 BIOCONDA INFO (OUT) cc1plus: all warnings being treated as errors
pinning the compiler back to GCC 12, the problem disappears.