title: How to use const int in _Static_assert?
body: <p>Preamble: I want to statically check amount of struct members in <strong>C program</strong>, so I created two macros, each of them creates constant int storing <code>__LINE__</code> into variable:</p>
  
  <pre><code> #include &lt;stdio.h&gt;
   #include &lt;string.h&gt;
   #define BEGIN(log) const int __##log##_begin = __LINE__;
   #define END(log) const int __##log##_end = __LINE__;
   BEGIN(TEST);
   struct TEST {
      int t1;
      int t2;
      float t3;
      int t4;
      int t5;
      int t6;
   };
   END(TEST)
  
   main()
   {
      static_assert(__TEST_end - __TEST_begin  == 6 + 3, "not_equal");
   }
  </code></pre>
  
  <p>When I use C++ compiler with -std=c++11 option (c++ test.cpp -std=c++11), it works fine, but the same code (with replacement of static_assert to _Static_assert) doesn't work in C(gcc version 4.8.4) with a strange error as this expression could be evaluated at a compile time:</p>
  
  <blockquote>
    <p>test.c: In function ‘main’: test.c:18:17: error: expression in static
    assertion is not constant   _Static_assert(__TEST_end - __TEST_begin 
    == 6 + 4, "not_equal");</p>
  </blockquote>
  
  <p>How can I fix this error or achieve the original goal in C?</p>