Visit Jeremy's Blog.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 09-29-2004, 09:37 AM   #1
Registered: Aug 2002
Location: tennessee
Distribution: gentoo
Posts: 39

Rep: Reputation: 15
gcc warning compiling C code

What does "warning: `or' of unmatched not-equal tests is always 1" mean?
That is the warning generated by gcc.

In particular, what is "always 1" or "unmatched" about

if ( (!((x>>(BITS*i))&MASK)) || (((x>>(BITS*i))&MASK) == MASK) ) {
if (d) h++;
else nh++;
} else {
if (d) f++;
else nf++;
Old 09-29-2004, 10:10 AM   #2
Senior Member
Registered: Jan 2004
Location: Oregon, USA
Distribution: Slackware
Posts: 1,246

Rep: Reputation: 59
I assume it's because of what BITS or MASK are set to. What's the rest of that function look like? And what are BITS and MASK set to?
Old 09-29-2004, 10:58 AM   #3
Registered: Aug 2002
Location: tennessee
Distribution: gentoo
Posts: 39

Original Poster
Rep: Reputation: 15
Yep, that was it. I naively supposed there was something "unmatched"; that threw me off.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
GCC 2.2.2 seems to genrate bad code dogbird Programming 2 11-19-2005 12:55 PM
Problem compiling code in g++ works for gcc juan_de_margo Programming 3 02-24-2005 03:41 AM
Implicit typename warning (gcc 3.3.4) ta0kira Programming 1 10-12-2004 03:45 AM
Kernel compiling: gcc-3.3 is 586, should be gcc-3.3 386 Erik Plaggenmar Linux - Software 0 10-01-2004 11:38 AM
Various Compiling Errors (GCC compiling Openal, GUIlib, xmms-wma) gregorya Linux - Software 2 08-27-2004 05:03 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:23 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration