compilation error with GCC8
Closed this issue · 2 comments
Hi,
Here is the error message:
g++ -c -o Table.o Table.cpp
Table.cpp: In member function ‘bool TableRow::CheckFormat(const char*, const char*)’:
Table.cpp:191:38: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
while( ( *pstr <= 32 ) && ( pstr != '\0' || pstr < Column(nCol-1) ) )
^~~~
make: *** [: Table.o] Error 1
Is this to be corrected into : *pstr != '\0'
or: pstr != NULL
?
Thanks,
Patrice
Hi,
Thanks for reporting the bug!
I have no idea why this bug was missed by the compiler.
And just as your suggest, it should be correct to *pstr != '\0'
.
It seems there had some improvement in GCC7, so that the compiler no longer missed the bug.
Thanks again!
tw
The method TableRow::CheckFormat
has never been used in NCLscan pipeline,
so this bug only affects the compilation with GCC version >= 7.