summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CompileWarningAsError/warn.c
diff options
context:
space:
mode:
authorRobert Maynard <rmaynard@nvidia.com>2022-06-28 13:49:36 (GMT)
committerRobert Maynard <rmaynard@nvidia.com>2022-06-29 15:50:34 (GMT)
commit2e9ac1d2726c4f260efd6b455242ec5d65391e12 (patch)
treea181ede8b2b6b83f7263f5aac9a1a6ff7de066ce /Tests/RunCMake/CompileWarningAsError/warn.c
parent8c562ece28b7a13ddb734b8c51710ebafe9ac570 (diff)
downloadCMake-2e9ac1d2726c4f260efd6b455242ec5d65391e12.zip
CMake-2e9ac1d2726c4f260efd6b455242ec5d65391e12.tar.gz
CMake-2e9ac1d2726c4f260efd6b455242ec5d65391e12.tar.bz2
Tests: Refactor warn on error tests to support multiple languages
Diffstat (limited to 'Tests/RunCMake/CompileWarningAsError/warn.c')
-rw-r--r--Tests/RunCMake/CompileWarningAsError/warn.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/Tests/RunCMake/CompileWarningAsError/warn.c b/Tests/RunCMake/CompileWarningAsError/warn.c
new file mode 100644
index 0000000..cd0c2ba
--- /dev/null
+++ b/Tests/RunCMake/CompileWarningAsError/warn.c
@@ -0,0 +1,25 @@
+static void unused_function();
+
+#ifdef __SUNPRO_C
+KandR(x) int x;
+{
+ return x;
+}
+#endif
+
+#ifdef __SUNPRO_CC
+struct A
+{
+ virtual ~A() throw();
+};
+struct B : public A
+{
+ virtual ~B() throw(int);
+};
+#endif
+
+int main(int argc, char* argv[])
+{
+ unsigned int unused_sign_conversion = -1;
+ return 1;
+}