https://llvm.org/bugs/show_bug.cgi?id=23177

David Majnemer <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |[email protected]
         Resolution|---                         |INVALID

--- Comment #1 from David Majnemer <[email protected]> ---
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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to