diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2018-02-01 14:06:55 -0500 |
---|---|---|
committer | Daniel P. Berrangé <berrange@redhat.com> | 2018-02-02 17:04:00 +0000 |
commit | 7779876a6b06755e3bb2c94ee3ded50635bcb0fa (patch) | |
tree | 526631694e74513076440d1e93bfb70ba0d3a7e6 /tests | |
parent | 0e0a317889464397d6f1ae03aad0d2ca593aab04 (diff) | |
download | keycodemapdb-7779876a6b06755e3bb2c94ee3ded50635bcb0fa.zip keycodemapdb-7779876a6b06755e3bb2c94ee3ded50635bcb0fa.tar.gz keycodemapdb-7779876a6b06755e3bb2c94ee3ded50635bcb0fa.tar.bz2 |
c++: add extern declaration to the generated file
The extern declaration affects how the C++ compiler does name mangling of global
variables. With:
$ g++ -c -Wall -std=c++11 -o osx2win32.o osx2win32.cc
$ nm osx2win32.o | grep code_map_osx_to_win32
0000000000000000 B code_map_osx_to_win32
00000000000000a1 t _GLOBAL__sub_I_code_map_osx_to_win32
Without:
$ g++ -c -Wall -std=c++11 -o osx2win32.o osx2win32.cc
$ nm osx2win32.o | grep code_map_osx_to_win32
0000000000000000 b _ZL21code_map_osx_to_win32
Not that unlike C, without "extern" you get a local variable ("b"), while
"extern" is needed to get a global!
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions