Discussion:
[ast-developers] *SEVERE* -Wtautological-compare warning when building with clang
Tina Harriott
2013-08-17 09:48:22 UTC
Permalink
clang 3.3 on Linux gives me the a *SEVERE* warning when building
ast-ksh.20130814:

/home/th/work/kshtrunk/src/cmd/ksh93/sh/nvtree.c:252:81: warning:
comparison of unsigned expression >= 0 is always true
[-Wtautological-compare]
if(mp && (ap=nv_arrayptr(mp)) &&
!ap->fun && !ap->flags && (c=nv_aindex(mp))>=0)

~~~~~~~~~~~~~~~~~^ ~
1 warning generated.

The >= expression is always true and thus useless.

Have you yet thought to make some warnings *fatal*, i.e. abort the
build when this happens?

Tina
--
Tina Harriott - Women in Mathematics
Contact: tina.harriott.math at gmail.com
Loading...