<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:david.majnemer@gmail.com" title="David Majnemer <david.majnemer@gmail.com>"> <span class="fn">David Majnemer</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - static char strange linker error"
   href="https://llvm.org/bugs/show_bug.cgi?id=23177">bug 23177</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>NEW
           </td>
           <td>RESOLVED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">CC</td>
           <td>
                
           </td>
           <td>david.majnemer@gmail.com
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>---
           </td>
           <td>INVALID
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - static char strange linker error"
   href="https://llvm.org/bugs/show_bug.cgi?id=23177#c1">Comment # 1</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - static char strange linker error"
   href="https://llvm.org/bugs/show_bug.cgi?id=23177">bug 23177</a>
              from <span class="vcard"><a class="email" href="mailto:david.majnemer@gmail.com" title="David Majnemer <david.majnemer@gmail.com>"> <span class="fn">David Majnemer</span></a>
</span></b>
        <pre>Hi Daniel,

Your program is invalid because you don't specify a definition of
Foo::Something.

You need something like the following in at least one translation unit:
const char Something::Foo;

The reason why you are observing different behavior between 'char' and
'unsigned char' is due to the fact that your static data member is ODR-used in
the operator[] of the map because the map takes a char& parameter.  When you
change the static data member's type to 'unsigned char', you instead get a
temporary created of the appropriate type and have it's address passed to the
map.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>