Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiler warnings because char is unsigned on ARM/PPC: "comparison is always false" (Origin: bugzilla #711097) #5334

Closed
doxygen opened this issue Jul 2, 2018 · 0 comments

Comments

@doxygen
Copy link
Owner

doxygen commented Jul 2, 2018

status RESOLVED severity major in component build for ---
Reported in version 1.8.5-GIT on platform Other
Assigned to: Dimitri van Heesch

Original attachment names and IDs:

On 2013-10-29 19:02:19 +0000, Trevor Robinson wrote:

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.

On 2013-10-29 19:04:37 +0000, Trevor Robinson wrote:

Created attachment 258481
Add -fsigned-char to linux-g++:TMAKE_CXXFLAGS in src/libdoxygen.pro.in

On 2013-11-03 15:16:16 +0000, Dimitri van Heesch wrote:

Thanks, I'll include the patch in the next GIT update.

On 2013-12-24 18:59:45 +0000, Dimitri van Heesch wrote:

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).

@doxygen doxygen closed this as completed Jul 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant