ESP-IDF Extension C++17 Compliance

rolandDM
Posts: 2
Joined: Mon Nov 09, 2020 11:20 am

ESP-IDF Extension C++17 Compliance

Postby rolandDM » Sun Dec 19, 2021 2:54 pm

I am struggling with the compiler of the ESP_IDF extension of VSCode.
My c_cpp_properties.json is plain-vanilla:

"compilerPath": "C:\\Users\\roland\\.espressif\\tools\\xtensa-esp32-elf\\esp-2020r3-8.4.0\\xtensa-esp32-elf\\bin\\xtensa-esp32-elf-gcc.exe",
"cStandard": "c11",
"cppStandard": "c++17", ...

but I am getting errors of the sort
"body of 'constexpr' function 'constexpr uint32_t bits::swap(uint32_t)' not a return-statement"
which should not appear anymore after C++11.

Pro info : I installed the platformio extension (the source code is a demo on platformio) and it compiles without any problem with its GNU C++14 compiler.

Can anybody help? Am I missing a setting ? Thanks in advance!

lg.lindstrom
Posts: 47
Joined: Fri Sep 17, 2021 4:02 pm

Re: ESP-IDF Extension C++17 Compliance

Postby lg.lindstrom » Sat Dec 24, 2022 12:05 pm

I am struggling with the same problem,, did you ever get it solved?

ESP_bignacio
Posts: 214
Joined: Wed May 02, 2018 12:12 pm

Re: ESP-IDF Extension C++17 Compliance

Postby ESP_bignacio » Tue Jan 03, 2023 7:18 am

You can try removing those "cStandard" and "cppStandard" from c_cpp_properties.json, which are not necessary. This is not ESP-IDF extension specific but part of the Microsoft C/C++ extension which the esp-idf rely for syntax highlight.

Would update the template c_cpp_properties.json in the next esp-idf extension version.

lg.lindstrom
Posts: 47
Joined: Fri Sep 17, 2021 4:02 pm

Re: ESP-IDF Extension C++17 Compliance

Postby lg.lindstrom » Fri Feb 03, 2023 8:04 am

Sorry for late answer,,, but that did not do any difference.

Who is online

Users browsing this forum: No registered users and 20 guests