title: register keyword in inline function included from C
body: <p>I am currently working on a mixed C and C++ project. Lately it happened that external library I have no control over added an inline function containing <code>register</code> keyword to header. For simplicity let's assume header looks like this:</p>
  <pre><code>// external_header.h
  inline int do_stuff() {
    register int res = 1;
    return res;
  }
  
  // some functions declarations without name mangling
  </code></pre>
  <p>And let's assume this is my code (as usless as it is):</p>
  <pre><code>// my_code.cpp
  
  #ifdef __cplusplus
  extern &quot;C&quot;{
  #endif
  
  #include &lt;external_header.h&gt;
  
  #ifdef __cplusplus
  }
  #endif
  
  int main(inc argc, char** argv) {
    return 0;
  }
  
  </code></pre>
  <p>Compiling my_code.cpp with C++17 switch gives error like this:</p>
  <blockquote>
  <p>error: ISO C++17 does not allow ‘register’ storage class specifier [-Werror=register]</p>
  </blockquote>
  <p>Can there be anything done to work around this error? If so, what is to be done?</p>