This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

c/4412: possible warning of logic errors not given



>Number:         4412
>Category:       c
>Synopsis:       possible warning of logic errors not given
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Sep 27 08:36:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Padraig@linux.ie
>Release:        2.96 20000731
>Organization:
>Environment:
i386-redhat-linux
>Description:
Basically if I have:
if (var!=const1 || var!=const2)
   printf("This will always happen");
I think you should get a warning when gcc -Wall used.
Perhaps you could handle other logic inconsistencies
also if you can think of any,
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="t.c"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="t.c"

I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgbWFpbih2b2lkKQp7CiAgICBpbnQgdD0xOwogICAgaWYg
KHQhPTEgfHwgdCE9MikKICAgICAgICBwcmludGYoIkFsd2F5cyB0cnVlXG4iKTsKICAgIHJldHVy
biAwOwp9Cg==


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]