title: Error Performing Pointer Arithmetic on void * in MSVC
body: <pre><code>Error    1    error C2036: 'const void *' : unknown size    file.cpp     111
  </code></pre>
  
  <p>I don't follow.  GCC never complains about void * pointer arithmetic, even on <code>-ansi -pedantic -Wall</code>. What's the problem?  </p>
  
  <p>Here's the  code- </p>
  
  <pre><code>struct MyStruct {
  
      const void *buf;    // Pointer to buffer  
      const void *bufpos; // Pointer to current position in buffer
  
  };
  
  ...
  
  size_t    someSize_t, anotherSize_t;
  MyStruct *myStruct = (MyStruct *) userdata;
  ...
    if ( (myStruct-&gt;bufpos + someSize_t) &gt; 
         (myStruct-&gt;buf + anotherSize_t) ) { // Error on this line
       ...
  </code></pre>