<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - fatal error C1189: #error: "We don't know a correct way to implement alignof(T) in C++03 outside of Clang" (MSVC 19.27.29112)"
   href="https://bugs.llvm.org/show_bug.cgi?id=47860">47860</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>fatal error C1189: #error:  "We don't know a correct way to implement alignof(T) in C++03 outside of Clang" (MSVC 19.27.29112)
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libc++
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>11.0
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows XP
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>release blocker
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Standards Issues
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>local.tourist.kiev@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org, mclow.lists@gmail.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=24066" name="attach_24066" title="My build config, despite it is not that helpful alone">attachment 24066</a> <a href="attachment.cgi?id=24066&action=edit" title="My build config, despite it is not that helpful alone">[details]</a></span>
My build config, despite it is not that helpful alone

I was curious to dig deeper into unresolved bugs, for supporting libc++, with
MSVC.

So I tried such a scenario:

<span class="quote">>cmake -DLLVM_PATH=../llvm -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="C:\Users\Worker\libcxx_dist"  -G Ninja ../libcxx</span >

Haven't saw anything suspicious, until I fired Ninja:

<span class="quote">>ninja -j 1</span >

Then I saw an error:

[1/82] Building CXX object src\CMakeFiles\cxx_shared.dir\barrier.cpp.obj
FAILED: src/CMakeFiles/cxx_shared.dir/barrier.cpp.obj
"C:\PROGRA~2\Microsoft Visual
Studio\2019\Community\VC\Tools\MSVC\14.27.29110\bin\Hostx64\x64\cl.exe" 
/nologo /TP -DNDEBUG -D_ALLOW_ITERATOR_DEBUG_LEVEL_MISMATCH
-D_ALLOW_MSC_VER_MISMATCH -D_CRTBLD -D_CRT_SECURE_NO_WARNINGS
-D_CRT_STDIO_ISO_WIDE_SPECIFIERS -D_LIBCPP_BUILDING_LIBRARY
-D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER  /DWIN32 /D_WINDOWS /W3 /GR /EHsc /MD /O2
/Ob2 /DNDEBUG -Wall -EHsc /I
C:/Users/Worker/Desktop/llvm-project/build_libcxx_msvc/include/c++/v1 /FI
C:/Users/Worker/Desktop/llvm-project/build_libcxx_msvc/__config_site -std:c++17
/showIncludes /Fosrc\CMakeFiles\cxx_shared.dir\barrier.cpp.obj
/Fdsrc\CMakeFiles\cxx_shared.dir\ /FS -c
C:\Users\Worker\Desktop\llvm-project\libcxx\src\barrier.cpp
Примечание: включение файла: 
C:/Users/Worker/Desktop/llvm-project/build_libcxx_msvc/__config_site
Примечание: включение файла: 
C:/Users/Worker/Desktop/llvm-project/build_libcxx_msvc/include/c++/v1\__config
C:/Users/Worker/Desktop/llvm-project/build_libcxx_msvc/include/c++/v1\__config(385):
warning C4668: "__ISO_C_VISIBLE" не задано как макроопределение препроцессора,
замена на "0" для "#if/#elif"
C:/Users/Worker/Desktop/llvm-project/build_libcxx_msvc/include/c++/v1\__config(439):
fatal error C1189: #error:  "We don't know a correct way to implement
alignof(T) in C++03 outside of Clang"

It seems to point me into
<a href="https://github.com/llvm/llvm-project/blob/c778f6c4f9d511023c0d71b9e14a90e60445d314/libcxx/include/__config#L401">https://github.com/llvm/llvm-project/blob/c778f6c4f9d511023c0d71b9e14a90e60445d314/libcxx/include/__config#L401</a>

Not only unclear why CMake's config. does not have a pre-defined error/require
checks.
I will perform farther investigation - but there might be some bug in
generator's instructions, in case if
<a href="https://docs.microsoft.com/en-us/cpp/build/reference/std-specify-language-standard-version?view=vs-2019">https://docs.microsoft.com/en-us/cpp/build/reference/std-specify-language-standard-version?view=vs-2019</a>
should be passed/specified properly.
But I am unsure YET.

<a href="https://drive.google.com/file/d/1VmtGHaeHWzBwYznEsgEtN7uNXGu7D8qK/view?usp=sharing">https://drive.google.com/file/d/1VmtGHaeHWzBwYznEsgEtN7uNXGu7D8qK/view?usp=sharing</a>
- this is my compressed build folder.

I am using VS 2019 Community edition.

<span class="quote">>cl</span >
Оптимизирующий компилятор Microsoft (R) C/C++ версии 19.27.29112 для x64</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>