diff --git a/Examples/test-suite/cpp11_thread_local.i b/Examples/test-suite/cpp11_thread_local.i index 7a82f7582..80c9e4e87 100644 --- a/Examples/test-suite/cpp11_thread_local.i +++ b/Examples/test-suite/cpp11_thread_local.i @@ -18,6 +18,7 @@ thread_local extern int teval; extern "C" thread_local int ectval; extern "C" { thread_local int ectval2; } extern "C++" thread_local int ecpptval; +extern "C++" { thread_local int ecpptval2; } thread_local int ThreadLocals::stval = 11; thread_local int ThreadLocals::tsval = 22; @@ -34,4 +35,5 @@ thread_local int teval = 44; thread_local int ectval = 55; thread_local int ectval2 = 56; thread_local int ecpptval = 66; +thread_local int ecpptval2 = 67; %} diff --git a/Source/CParse/parser.y b/Source/CParse/parser.y index beb326646..2fd81ad9d 100644 --- a/Source/CParse/parser.y +++ b/Source/CParse/parser.y @@ -3139,7 +3139,9 @@ c_declaration : c_decl { n = nextSibling(n); } } else { - Swig_warning(WARN_PARSE_UNDEFINED_EXTERN,cparse_file, cparse_line,"Unrecognized extern type \"%s\".\n", $2); + if (!Equal($2,"C++")) { + Swig_warning(WARN_PARSE_UNDEFINED_EXTERN,cparse_file, cparse_line,"Unrecognized extern type \"%s\".\n", $2); + } $$ = new_node("extern"); Setattr($$,"name",$2); appendChild($$,firstChild($5));