Closed lmjakt closed 1 year ago
It shouldn't cause a problem, as we do test builds with -std=c99
. But thanks for reporting this, as we try to avoid putting declarations in for loops to keep early versions of gcc happy. Unfortunately it looks like one sneaked through here; we'll remove it.
Thanks for your reply and your efforts to keep htslib compatible across many compilers. I very much appreciate that style of coding.
cheers,
Martin
I suspect that you may already be aware of the following, but if not perhaps it is useful to know:
I get the following errors and suggestions from gcc (4.8.5) when compiling hstlib, samtools or bcftools:
they are solved by adding -std=gnu99 to the CFLAGS of the Makefiles of hstlib, samtools and bcftools.
I presume that this is specific to the version of gcc and hence not that important. Especially as it seems like there is a plan to specify std=c99 from looking at the htslib Makefile.
So this does not seem to be a problem per se, but I'm wondering whether there there is any potential problem with adding std=c99 or std=gnu99?
cheers,
Martin