You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
vcf.c:5109:5: error: 'for' loop initial declarations are only allowed in C99 mode
for (int idx = 0; idx < sizeof(errdesc_bcf) / sizeof(err_desc); ++idx) {
^
vcf.c:5109:5: note: use option -std=c99 or -std=gnu99 to compile your code
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
The text was updated successfully, but these errors were encountered:
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.
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
The text was updated successfully, but these errors were encountered: