title: Declare C function to accept only constant numbers
body: <p>Is it possible to declare a function in C which allows passing only a numeric const (no variables)?</p>
  
  <p>Example: </p>
  
  <pre><code>uint8_t gmul256(uint8_t x, uint8_t y);
  </code></pre>
  
  <p>Parameter "y" shall be accepted as numeric constant only. Variables, pointers etc. shall generate an error.</p>
  
  <pre><code>res = gmul256(var, 5); // -&gt; OK
  res = gmul256(var1, var2); // -&gt; Shall generate compile error
  </code></pre>
  
  <p>Compiler is gcc.</p>
  
  <p>Background: Mitigation of timing and power analysis attacks in AES code, generate more performant code.</p>