annotate clang/test/Preprocessor/pragma-comment-elf.c @ 236:c4bab56944e8 llvm-original

LLVM 16
author kono
date Wed, 09 Nov 2022 17:45:10 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
236
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
1 // RUN: %clang_cc1 %s -fsyntax-only -verify -fms-extensions -triple x86_64-scei-ps4
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
2 // RUN: %clang_cc1 %s -fsyntax-only -verify -fms-extensions -triple x86_64-sie-ps5
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
3 // RUN: %clang_cc1 %s -fsyntax-only -verify -fms-extensions -triple i686-unknown-linux-gnu
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
4
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
5 // On ELF targets, issue a diagnostic that pragma comments are ignored except:
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
6 // #pragma comment lib
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
7
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
8 #pragma comment(lib)
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
9 #pragma comment(lib,"foo")
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
10 __pragma(comment(lib, "bar"))
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
11
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
12 #pragma comment(linker) // expected-warning {{'#pragma comment linker' ignored}}
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
13 #pragma comment(linker,"foo") // expected-warning {{'#pragma comment linker' ignored}}
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
14 __pragma(comment(linker, " bar=" "2")) // expected-warning {{'#pragma comment linker' ignored}}
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
15
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
16 #pragma comment(user) // expected-warning {{'#pragma comment user' ignored}}
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
17 #pragma comment(user, "Compiled on " __DATE__ " at " __TIME__ ) // expected-warning {{'#pragma comment user' ignored}}
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
18 __pragma(comment(user, "foo")) // expected-warning {{'#pragma comment user' ignored}}
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
19
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
20 #pragma comment(compiler) // expected-warning {{'#pragma comment compiler' ignored}}
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
21 #pragma comment(compiler, "foo") // expected-warning {{'#pragma comment compiler' ignored}}
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
22 __pragma(comment(compiler, "foo")) // expected-warning {{'#pragma comment compiler' ignored}}
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
23
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
24 #pragma comment(exestr) // expected-warning {{'#pragma comment exestr' ignored}}
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
25 #pragma comment(exestr, "foo") // expected-warning {{'#pragma comment exestr' ignored}}
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
26 __pragma(comment(exestr, "foo")) // expected-warning {{'#pragma comment exestr' ignored}}
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
27
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
28 #pragma comment(foo) // expected-error {{unknown kind of pragma comment}}
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
29 __pragma(comment(foo)) // expected-error {{unknown kind of pragma comment}}