blob: 38520b0c2eff18fe385b1db64eb09bc262e6e962 [file] [log] [blame]
Reid Kleckner1a711b12014-07-22 00:53:05 +00001// RUN: %clang_cc1 -fsyntax-only -verify -fms-extensions %s -triple x86_64-pc-win32
2
3#pragma init_seg(L".my_seg") // expected-warning {{expected 'compiler', 'lib', 'user', or a string literal}}
4#pragma init_seg( // expected-warning {{expected 'compiler', 'lib', 'user', or a string literal}}
5#pragma init_seg asdf // expected-warning {{missing '('}}
6#pragma init_seg) // expected-warning {{missing '('}}
7#pragma init_seg("a" "b") // no warning
8#pragma init_seg("a", "b") // expected-warning {{missing ')'}}
9#pragma init_seg("a") asdf // expected-warning {{extra tokens at end of '#pragma init_seg'}}
10#pragma init_seg("\x") // expected-error {{\x used with no following hex digits}}
11#pragma init_seg("a" L"b") // expected-warning {{expected non-wide string literal in '#pragma init_seg'}}
12
13int f();
14#pragma init_seg(compiler)
15int __declspec(thread) x = f(); // expected-error {{initializer for thread-local variable must be a constant expression}}