title: Pointer to literal value
body: <p>Suppose I have a constant defined in a header file</p>
  
  <pre><code>#define THIS_CONST 'A'
  </code></pre>
  
  <p>I want to write this constant to a stream. I do something like:</p>
  
  <pre><code>char c = THIS_CONST;
  write(fd, &amp;c, sizeof(c))
  </code></pre>
  
  <p>However, what I would <em>like</em> to do for brevity and clarity is:</p>
  
  <pre><code>write(fd, &amp;THIS_CONST, sizeof(char)); // error
                                        // lvalue required as unary ‘&amp;’ operand
  </code></pre>
  
  <p>Does anyone know of any macro/other trick for obtaining a pointer to a literal? I would like something which can be used like this:</p>
  
  <pre><code>write(fd, PTR_TO(THIS_CONST), sizeof(char))
  </code></pre>
  
  <hr>
  
  <p>Note: I realise I could declare my constants as static const variables, but then I can't use them in switch/case statements. i.e.</p>
  
  <pre><code>static const char THIS_CONST = 'A'
  ...
  switch(c) {
    case THIS_CONST: // error - case label does not reduce to an integer constant
      ...
  }
  </code></pre>
  
  <p>Unless there is a way to use a const variable in a case label?</p>