Page 2 of 2

Re: Need help with Espressif IDE 4.0

Posted: Tue Apr 28, 2026 8:30 am
by kondalkolipaka
Hello,

I was trying to reproduce this behaviour with the similar headers!

Build is fine - this is an IDE indexer (clangd) false error, not a real compile issue.

How to fix:
- update .clangd to avoid this false-positive escalation:

Code: Select all

CompileFlags:
  CompilationDatabase: build
  Remove: [-m*, -f*]
  Add: [-Wno-attributes, -Wno-ignored-attributes]
Diagnostics:
  Suppress: [attribute_not_type_attr]

What's happening:

- ESP-IDF uses the Xtensa GCC toolchain and compiles successfully.
- clangd (used for editor diagnostics) parses some picolibc headers differently.
- In pthread.h, clangd misinterprets __noreturn and reports:'noreturn' attribute cannot be applied to types. Because warning policy includes -Werror, clangd shows it like a hard error near <iostream>
.
Screenshot 2026-04-28 at 1.53.13 PM.png
Screenshot 2026-04-28 at 1.53.13 PM.png (1.63 MiB) Viewed 33 times