Re: [PATCH] sparse: ignore warning from new glibc headers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Đoàn Trần Công Danh <congdanhqx@xxxxxxxxx> writes:

>> BTW, I didn't expect it to take this long for this issue to come
>> back to the list! I expected it to almost immediately cause
>> problems with the sparse ci job, when the version of Ubuntu was
>> updated to the LTS (now previous LTS!). So, I just found a simple
>> solution for now (which turned into 2 years).
>
> Well, yeah, -Wno-vla would work, I used that macro __STDC_NO_VLA__
> because I'm not sure Git want to use vla or not, so I only tried to
> disable it for system headers.

Defining __STDC_NO_VLA__ would rid use of variable length arrays in
the regex.h header, so "-Wno-vla" would not be necessary.  It's just
that it makes me feel a bit dirty to define the macro that only
compiler implementations are expected to define in order to cause
header files behave the way they would with a compiler without VLA.

If we apply Luc's patch [*1*] to sparse, the header would use vla in
parameter in the prototype, sparse would grok it, *and* then
complain that we are using vla, so we still need "-Wno-vla" on top
(but "-Wno-vla" alone would not make (unpatched) sparse grok the
construct, of course).

> And yes, the vla declarationw as added into glibc 2.35.

Thanks.


[Reference]

*1* https://lore.kernel.org/all/uug4xslokvlxr6z24q52z4pt7nrtiimbzunz2gz3kpilk4kxts@7jljsksi6baq/





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux