Re: [PATCH] selftests/bpf: add -std=gnu11 to BPF_CFLAGS and CFLAGS

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

 



On Friday, January 10th, 2025 at 3:34 PM, Andrii Nakryiko <andrii.nakryiko@xxxxxxxxx> wrote:

> 
> 
> On Tue, Jan 7, 2025 at 3:58 PM Ihor Solodrai ihor.solodrai@xxxxx wrote:
> 
> > Latest versions of GCC BPF use C23 standard by default. This causes
> > compilation errors in vmlinux.h due to bool types declarations.
> 
> 
> Do you have an example of an error? Why can't we fix that to work with C23?

See a thread here: https://lore.kernel.org/bpf/ZryncitpWOFICUSCu4HLsMIZ7zOuiH5f4jrgjAh0uiOgKvZzQES09eerwIXNonKEq0U6hdI9pHSCPahUKihTeS8NKlVfkcuiRLotteNbQ9I=@pm.me/

The one I ran into is about:

    enum {
    	false = 0,
    	true = 1,
    };

Which is illegal in C23, because true and false are reserved words.

> 
> [...]





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux