https://bugs.kde.org/show_bug.cgi?id=422219

            Bug ID: 422219
           Summary: Including <ranges> with active C++2a parser crashes
                    kdevelop
           Product: kdevelop
           Version: 5.5.1
          Platform: Archlinux Packages
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: Language Support: CPP (Clang-based)
          Assignee: kdevelop-bugs-n...@kde.org
          Reporter: j...@meinkes.com
  Target Milestone: ---

SUMMARY
A file that includes ranges crashes kdevelop when the C++ profile is set to
c++2a.


STEPS TO REPRODUCE
1. Create a C++ project
2. Create a C++ file that contain the line #include <ranges>
3. Set the C++ Profile to c++2a (also happens when CMakeLists.txt contains
set(CMAKE_CXX_STANDARD 20) )

OBSERVED RESULT
Kdevelop starts to reparse the project and crashes at about 87%.

EXPECTED RESULT
Kdevelop reparses the project and treats it as C++20.


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux
(available in About System)
KDE Plasma Version: 5.18.5
KDE Frameworks Version: 5.70.0
Qt Version: 5.14.2

ADDITIONAL INFORMATION

I'm using gcc 10.1.0 and clang 10.0.0. The last message that is printed to the
terminal is:

kdevelop.plugins.definesandincludes: error while fetching includes for the
compiler: "clang" "clang version 10.0.0 \nTarget: x86_64-pc-linux-gnu\nThread
model: posix\nInstalledDir: /usr/bin\nFound candidate GCC installation:
/usr/bin/../lib/gcc/x86_64-pc-linux-gnu/10.1.0\nFound candidate GCC
installation: /usr/bin/../lib/gcc/x86_64-pc-linux-gnu/8.4.0\nFound candidate
GCC installation: /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/10.1.0\nFound
candidate GCC installation:
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.4.0\nFound candidate GCC
installation: /usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0\nFound candidate GCC
installation: /usr/lib/gcc/x86_64-pc-linux-gnu/8.4.0\nFound candidate GCC
installation: /usr/lib64/gcc/x86_64-pc-linux-gnu/10.1.0\nFound candidate GCC
installation: /usr/lib64/gcc/x86_64-pc-linux-gnu/8.4.0\nSelected GCC
installation: /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/10.1.0\nCandidate
multilib: .;@m64\nCandidate multilib: 32;@m32\nSelected multilib: .;@m64\n
(in-process)\n \"/usr/bin/clang-10\" -cc1 -triple x86_64-pc-linux-gnu -E
-disable-free -disable-llvm-verifier -discard-value-names -main-file-name -
-mrelocation-model pic -pic-level 2 -pic-is-pie -mthread-model posix
-mframe-pointer=all -fmath-errno -fno-rounding-math -masm-verbose
-mconstructor-aliases -munwind-tables -target-cpu x86-64 -dwarf-column-info
-fno-split-dwarf-inlining -debugger-tuning=gdb -v -resource-dir
/usr/lib/clang/10.0.0
-I/opt/intel/compilers_and_libraries_2020.0.166/linux/ipp/include
-ISUBSTITUTE_INSTALL_DIR_HERE/include -ISUBSTITUTE_INSTALL_DIR_HERE/stdlib
-I/opt/intel/compilers_and_libraries_2020.0.166/linux/tbb/include
-internal-isystem /usr/local/include -internal-isystem
/usr/lib/clang/10.0.0/include -internal-externc-isystem /include
-internal-externc-isystem /usr/include -std=gnu++2a -fdebug-compilation-dir
/tmp/testcpp20/build -ferror-limit 19 -fmessage-length 0 -stack-protector 2
-fgnuc-version=4.2.1 -fobjc-runtime=gcc -fdiagnostics-show-option -faddrsig -o
- -x c -\nerror: invalid argument '-std=gnu++2a' not allowed with 'C'\n"
kdevelop.plugins.definesandincludes: error while fetching defines for the
compiler: "clang" ("-xc", "-std=gnu++2a", "-dM", "-E", "-") "error: invalid
argument '-std=gnu++2a' not allowed with 'C'\n"

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to