GNU bug report logs - #78250
31.0.50; Eglot: eglot-show-call-hierarchy

Previous Next

Package: emacs;

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


Message #28 received at 78250-done <at> debbugs.gnu.org (full text, mbox):

From: João Távora <joaotavora <at> gmail.com>
To: Gerd Möllmann <gerd.moellmann <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 78250-done <at> debbugs.gnu.org
Subject: Re: bug#78250: 31.0.50; Eglot: eglot-show-call-hierarchy
Date: Fri, 09 May 2025 09:22:16 +0100
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.

João




This bug report was last modified 11 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.