1 // RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -fsyntax-only -fms-extensions -verify %s
2 // RUN: %clang_cc1 -triple x86_64-pc-windows-msvc -fsyntax-only -fms-extensions -verify %s -DMSVC
4 // Export const variable.
7 // expected-error@+4 {{'j' must have external linkage when declared 'dllexport'}}
9 // expected-warning@+2 {{__declspec attribute 'dllexport' is not supported}}
11 __declspec(dllexport
) int const j
; // expected-error {{default initialization of an object of const type 'const int'}}
14 typedef const int CInt
;
17 // expected-error@+4 {{'j2' must have external linkage when declared 'dllexport'}}
19 // expected-warning@+2 {{__declspec attribute 'dllexport' is not supported}}
21 __declspec(dllexport
) CInt j2
; //expected-error {{default initialization of an object of const type 'CInt'}}
24 // expected-warning@+2 {{__declspec attribute 'dllexport' is not supported}}
26 __declspec(dllexport
) CInt j3
= 3;