GNOME Bugzilla – Bug 711097
Compiler warnings because char is unsigned on ARM/PPC: "comparison is always false"
Last modified: 2013-12-24 18:59:45 UTC
Lots of compiler warnings indicating invalid code generation when building on arm-linux-gnueabihf (Ubuntu 13.04) with gcc 4.7.3: g++ -c -pipe -fno-exceptions -D_LARGEFILE_SOURCE -Wall -W -O2 -I../qtools -I../libmd5 -o ../objects/latexgen.o latexgen.cpp latexgen.cpp: In member function 'virtual void LatexGenerator::codify(const char*)': latexgen.cpp:1575:20: warning: comparison is always false due to limited range of data type [-Wtype-limits] latexgen.cpp:1587:24: warning: comparison is always false due to limited range of data type [-Wtype-limits] g++ -c -pipe -fno-exceptions -D_LARGEFILE_SOURCE -Wall -W -O2 -I../qtools -I../libmd5 -o ../objects/markdown.o markdown.cpp markdown.cpp: In function 'QCString detab(const QCString&, int&)': markdown.cpp:2189:15: warning: comparison is always false due to limited range of data type [-Wtype-limits] g++ -c -pipe -fno-exceptions -D_LARGEFILE_SOURCE -Wall -W -O2 -I../qtools -I../libmd5 -o ../objects/util.o util.cpp util.cpp: In function 'QCString escapeCharsInString(const char*, bool, bool)': util.cpp:5177:23: warning: comparison is always false due to limited range of data type [-Wtype-limits] util.cpp: In function 'const char* writeUtf8Char(FTextStream&, const char*)': util.cpp:6919:9: warning: comparison is always false due to limited range of data type [-Wtype-limits] util.cpp: In function 'int nextUtf8CharPosition(const QCString&, int, int)': util.cpp:6939:9: warning: comparison is always false due to limited range of data type [-Wtype-limits] util.cpp: In function 'QCString parseCommentAsText(const Definition*, const MemberDef*, const QCString&, const QCString&, int)': util.cpp:6997:25: warning: comparison is always true due to limited range of data type [-Wtype-limits] util.cpp: In function 'bool readInputFile(const char*, BufStr&, bool, bool)': util.cpp:7454:23: warning: comparison is always false due to limited range of data type [-Wtype-limits] util.cpp:7454:42: warning: comparison is always false due to limited range of data type [-Wtype-limits] util.cpp:7455:23: warning: comparison is always false due to limited range of data type [-Wtype-limits] util.cpp:7455:42: warning: comparison is always false due to limited range of data type [-Wtype-limits] This can be easily fixed by adding -fsigned-char to linux-g++:TMAKE_CXXFLAGS in src/libdoxygen.pro.in.
Created attachment 258481 [details] [review] Add -fsigned-char to linux-g++:TMAKE_CXXFLAGS in src/libdoxygen.pro.in
Thanks, I'll include the patch in the next GIT update.
This bug was previously marked ASSIGNED, which means it should be fixed in doxygen version 1.8.6. Please verify if this is indeed the case. Reopen the bug if you think it is not fixed and please include any additional information that you think can be relevant (preferrably in the form of a self-contained example).