diff options
author | Robert Maynard <rmaynard@nvidia.com> | 2022-06-28 13:49:36 (GMT) |
---|---|---|
committer | Robert Maynard <rmaynard@nvidia.com> | 2022-06-29 15:50:34 (GMT) |
commit | 2e9ac1d2726c4f260efd6b455242ec5d65391e12 (patch) | |
tree | a181ede8b2b6b83f7263f5aac9a1a6ff7de066ce /Tests/RunCMake/CompileWarningAsError/warn.c | |
parent | 8c562ece28b7a13ddb734b8c51710ebafe9ac570 (diff) | |
download | CMake-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.c | 25 |
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; +} |