Add support for extern "C++" - no warning should be issued as was previously occurring

This commit is contained in:
William S Fulton 2013-02-08 18:55:16 +00:00
commit 8778724768
5 changed files with 16 additions and 2 deletions

View file

@ -507,7 +507,7 @@ CPP0X_TEST_CASES = \
# cpp0x_inheriting_constructors \ # not supported by gcc-4.7
# cpp0x_hash_tables \ # not fully implemented yet
# cpp0x_result_of \ # SWIG does not support
# cpp0x_thread_local \ # not supported by any compiler yet
# cpp0x_thread_local \ # needs gcc-4.8
# Broken C++0x test cases.
CPP0X_TEST_BROKEN =

View file

@ -16,6 +16,7 @@ thread_local static int tsval;
extern thread_local int etval;
thread_local extern int teval;
extern "C" thread_local int ectval;
extern "C++" thread_local int ecpptval;
thread_local int ThreadLocals::stval = 11;
thread_local int ThreadLocals::tsval = 22;
@ -28,4 +29,5 @@ thread_local const int ThreadLocals::tscval99;
thread_local int etval = 33;
thread_local int teval = 44;
thread_local int ectval = 55;
thread_local int ecpptval = 66;
%}

View file

@ -43,5 +43,9 @@ public class cpp0x_thread_local_runme {
cpp0x_thread_local.setEctval(-55);
if (cpp0x_thread_local.getEctval() != -55)
throw new RuntimeException();
cpp0x_thread_local.setEcpptval(-66);
if (cpp0x_thread_local.getEcpptval() != -66)
throw new RuntimeException();
}
}

View file

@ -32,3 +32,7 @@ cvar.ectval = -66
if cvar.ectval != -66:
raise RuntimeError
cvar.ecpptval = -66
if cvar.ecpptval != -66:
raise RuntimeError