[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ast-users
Subject:    [ast-users] *SEVERE* -Wtautological-compare warning when building with clang
From:       Tina Harriott <tina.harriott.math () gmail ! com>
Date:       2013-08-17 9:48:22
Message-ID: CAH5-_XN+PJLw-mHSvSjNFjR76q4EdS5OA3+2UYGVRPFdTUrQkQ () mail ! gmail ! com
[Download RAW message or body]

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@gmail.com
_______________________________________________
ast-users mailing list
ast-users@lists.research.att.com
http://lists.research.att.com/mailman/listinfo/ast-users
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic