title: disable spurious "warning: left shift count >= width of type"
body: <p>I'm getting a spurious "warning: left shift count >= width of type" when compiling some template code with gcc:</p>
  
  <pre><code>template &lt;int N&gt; class bitval {
  unsigned long  val;
  #pragma GCC diagnostic ignored "-Wall"
      const bitval &amp;check() {
          if (N &lt; sizeof(unsigned long) * CHAR_BIT &amp;&amp; val &gt;= (1UL &lt;&lt; N)) {
              std::clog &lt;&lt; val &lt;&lt; " out of range for " &lt;&lt; N &lt;&lt; " bits in " &lt;&lt; std::endl;
              val &amp;= (1UL &lt;&lt; N) - 1; }
          return *this; }
  #pragma GCC diagnostic pop
  };
  </code></pre>
  
  <p>The problem being that when it is instantiated with N == 64, it gives the warning.</p>
  
  <p>Now the warning is completely spurious, as the code checks for N being large enough that no check/mask is needed, so when N is 64, the shifts will never happen.  But gcc warns anyways.  So I'm trying to disable the warning, but I can't figure out the needed #pragma magic to shut it up...</p>