GNU bug report logs -
#78250
31.0.50; Eglot: eglot-show-call-hierarchy
Previous Next
Reported by: Gerd Möllmann <gerd.moellmann <at> gmail.com>
Date: Mon, 5 May 2025 03:37:02 UTC
Severity: normal
Found in version 31.0.50
Done: João Távora <joaotavora <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
João Távora <joaotavora <at> gmail.com> writes:
> Gerd Möllmann <gerd.moellmann <at> gmail.com> writes:
>
>> João Távora <joaotavora <at> gmail.com> writes:
>>
>>> diff --git a/.clangd b/.clangd
>>> index 469d33dfd03..5c7308d64ae 100644
>>> --- a/.clangd
>>> +++ b/.clangd
>>> @@ -2,4 +2,5 @@
>>> If:
>>> PathMatch: "src/*.c"
>>> CompileFlags:
>>> - Add: [-Wno-unused-macros, -include=config.h]
>>> + Add: [-Wno-unused-macros, -include=config.h, -fstrict-flex-arrays=3]
>>> + Remove: [-fstrict-flex-arrays]
>>
>> Hm, is there something wrong with the flexible array members in Emacs?
>
> No reason to think so, but I get a "unknown flag -fstrict-flex-arrays"
> diagnostic from clangd (both versions 19 and 21git), which I presume
> comes from that flag being mentioned in compile_commands.json but not
> understood by the clang compiler that lives in clangd. These are
> relatively common in projects with very specific flags. The patch above
> fixes the situation while also telling clangd that we are using strict
> flex arrays (in case that influences its analysis).
>
> If you don't get that diagonstic, perhaps you're using a hand-rolled
> compile_commands.json. I used simply `bear -- make` to create mine
> after deleting src/*.o.
I don't have that flag in compile-commands.json, but maybe the
difference is that I also build with clang (macOS/arm64). The
compilation database is also from bear -- gmake.
This bug report was last modified 10 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.