diff options
author | kchoi <code.kchoi@gmail.com> | 2016-09-07 14:12:22 -0700 |
---|---|---|
committer | Jan Vorlicek <janvorli@microsoft.com> | 2016-09-07 23:12:22 +0200 |
commit | 4149bd2070e0a8beec6dedb238e6fd832a39611b (patch) | |
tree | 7aa9401597ad87d4d1d902643439af1614458b99 /src/pal/tests/palsuite/c_runtime/fwprintf/test12/test12.c | |
parent | 09133905fce3b541702044b6d2bbe942a6b40155 (diff) | |
download | coreclr-4149bd2070e0a8beec6dedb238e6fd832a39611b.tar.gz coreclr-4149bd2070e0a8beec6dedb238e6fd832a39611b.tar.bz2 coreclr-4149bd2070e0a8beec6dedb238e6fd832a39611b.zip |
Fix strict aliasing violation from conditional typedef of wchar_t by building entire project as C++ for Unix (#6801)
Enable building CoreCLR as C++ project on Unix
This series of patches fixes the strict aliasing violation from
the conditional typedef of wchar_t in src/pal/inc/pal_char16.h:40
* rename c files to cpp
* modify all cmake files to change .c files to .cpp
* apply c++ linkage to templates
Diffstat (limited to 'src/pal/tests/palsuite/c_runtime/fwprintf/test12/test12.c')
-rw-r--r-- | src/pal/tests/palsuite/c_runtime/fwprintf/test12/test12.c | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/src/pal/tests/palsuite/c_runtime/fwprintf/test12/test12.c b/src/pal/tests/palsuite/c_runtime/fwprintf/test12/test12.c deleted file mode 100644 index 48a6123423..0000000000 --- a/src/pal/tests/palsuite/c_runtime/fwprintf/test12/test12.c +++ /dev/null @@ -1,52 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/*============================================================================ -** -** Source: test12.c -** -** Purpose: Tests the (lowercase) hexadecimal specifier (%x). -** This test is modeled after the sprintf series. -** -** -**==========================================================================*/ - -#include <palsuite.h> -#include "../fwprintf.h" - -/* - * Depends on memcmp, strlen, fopen, fseek and fgets. - */ - -int __cdecl main(int argc, char *argv[]) -{ - int neg = -42; - int pos = 0x1234ab; - INT64 l = I64(0x1234567887654321); - - if (PAL_Initialize(argc, argv) != 0) - { - return(FAIL); - } - - DoNumTest(convert("foo %x"), pos, "foo 1234ab"); - DoNumTest(convert("foo %lx"), pos, "foo 1234ab"); - DoNumTest(convert("foo %hx"), pos, "foo 34ab"); - DoNumTest(convert("foo %Lx"), pos, "foo 1234ab"); - DoI64Test(convert("foo %I64x"), l, "0x1234567887654321", - "foo 1234567887654321", "foo 0x1234567887654321"); - DoNumTest(convert("foo %7x"), pos, "foo 1234ab"); - DoNumTest(convert("foo %-7x"), pos, "foo 1234ab "); - DoNumTest(convert("foo %.1x"), pos, "foo 1234ab"); - DoNumTest(convert("foo %.7x"), pos, "foo 01234ab"); - DoNumTest(convert("foo %07x"), pos, "foo 01234ab"); - DoNumTest(convert("foo %#x"), pos, "foo 0x1234ab"); - DoNumTest(convert("foo %+x"), pos, "foo 1234ab"); - DoNumTest(convert("foo % x"), pos, "foo 1234ab"); - DoNumTest(convert("foo %+x"), neg, "foo ffffffd6"); - DoNumTest(convert("foo % x"), neg, "foo ffffffd6"); - - PAL_Terminate(); - return PASS; -} |