Open YWtheGod opened 3 weeks ago
editline.h on my computer: Editline.h.zip
@llvm/issue-subscribers-lldb
Author: YWtheGod (YWtheGod)
Do you have the specific compile command that was used to try to compile Editline.cpp? The error message is strange to me, I would imagine minGW's gcc 14.2 should be able to understand this function pointer type.
To bullbazord:
[13/3635] Building CXX object tools/lldb/source/Host/CMakeFiles/lldbHost.dir/common/Editline.cpp.obj
FAILED: tools/lldb/source/Host/CMakeFiles/lldbHost.dir/common/Editline.cpp.obj
D:\msys64\mingw64\bin\c++.exe -DGTEST_HAS_RTTI=0 -DHAVE_ROUND -DUNICODE -D_BSD_SOURCE -D_ENABLE_EXTENDED_ALIGNED_STORAGE -D_FILE_OFFSET_BITS=64 -D_UNICODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -ID:/msys64/home/ywthe/llvm-project/build/tools/lldb/source/Host -ID:/msys64/home/ywthe/llvm-project/lldb/source/Host -ID:/msys64/home/ywthe/llvm-project/lldb/include -ID:/msys64/home/ywthe/llvm-project/build/tools/lldb/include -ID:/msys64/home/ywthe/llvm-project/build/include -ID:/msys64/home/ywthe/llvm-project/llvm/include -ID:/conda/include -ID:/msys64/home/ywthe/llvm-project/llvm/../clang/include -ID:/msys64/home/ywthe/llvm-project/build/tools/lldb/../clang/include -ID:/msys64/home/ywthe/llvm-project/lldb/source -ID:/msys64/home/ywthe/llvm-project/build/tools/lldb/source -isystem D:/msys64/mingw64/include/libxml2 -Wa,-mbig-obj -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -ffunction-sections -fdata-sections -Wno-deprecated-declarations -Wno-unknown-pragmas -Wno-strict-aliasing -Wno-stringop-truncation -O2 -DNDEBUG -std=c++17 -fno-exceptions -funwind-tables -fno-rtti -MD -MT tools/lldb/source/Host/CMakeFiles/lldbHost.dir/common/Editline.cpp.obj -MF tools\lldb\source\Host\CMakeFiles\lldbHost.dir\common\Editline.cpp.obj.d -o tools/lldb/source/Host/CMakeFiles/lldbHost.dir/common/Editline.cpp.obj -c D:/msys64/home/ywthe/llvm-project/lldb/source/Host/common/Editline.cpp
In file included from D:/msys64/home/ywthe/llvm-project/lldb/source/Host/common/Editline.cpp:13:
D:/msys64/home/ywthe/llvm-project/lldb/include/lldb/Host/Editline.h:86:44: error: expected ';' before '(' token
86 | using EditlineGetCharCallbackType = int (*)(::EditLine *editline,
| ^
| ;
D:/msys64/home/ywthe/llvm-project/lldb/include/lldb/Host/Editline.h:88:54: error: expected ';' before '(' token
88 | using EditlineCommandCallbackType = unsigned char (*)(::EditLine *editline,
| ^
| ;
D:/msys64/home/ywthe/llvm-project/lldb/include/lldb/Host/Editline.h:90:51: error: expected ';' before '(' token
90 | using EditlinePromptCallbackType = const char *(*)(::EditLine *editline);
| ^
| ;
etc...
And I tryed to build lldb on Ubuntu 18.04+gcc 11.4, It didn't have the same issue.
Hmm, I'm not sure what could be going on here. I would recommend trying to reduce the problem by removing code from the file and recompiling to see which pattern triggers the error.
Error compiling tools/lldb/source/Host/CMakeFiles/lldbHost.dir/common/Editline.cpp.obj
version: commit 51ca2354d0a4083b9219df131ceff98bccb622b4 (HEAD -> main, origin/main, origin/HEAD)
compiler: mingw64 gcc 14.2
message: