title: How to fix the warning: '&&' within '||'
body: <p>Is this a problem with GCC? I have tried running on Windows and it doesn't raise this warning. Is there a way (except from inserting the parentheses) around this?</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int x, y;
  
  int main (void)
  {
  x = 3;
  y = 7;
  
  if ((y &lt; 2) || (y &gt; 5) &amp;&amp; (x &lt; 12)) {
      printf ("Yes\n");
  } else
      printf ("Nope\n");
  return 0;
  }
  </code></pre>
  
  <p>Results in:</p>
  
  <pre><code>/Users/filename:18:28: warning: '&amp;&amp;' within '||' [-Wlogical-op-parentheses]
      if ((y &lt; 2) || (y &gt; 5) &amp;&amp; (x &lt; 12)) {
                  ~~ ~~~~~~~~^~~~~~~~~~~
  /Users/filename:18:28: note: place parentheses around the '&amp;&amp;' expression to
        silence this warning
      if ((y &lt; 2) || (y &gt; 5) &amp;&amp; (x &lt; 12)) {
                             ^
                     (                  )
  </code></pre>