From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0BB883852229; Wed, 23 Nov 2022 17:37:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0BB883852229 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1669225054; bh=eRL8J3mPiogj173g9A61OPApFakVbjLKX2IELG77VQg=; h=From:To:Subject:Date:From; b=ZBo2/ROvxCYsrdJ/pH4+VI9zdaBVw3okSZ9t4keKXB5eyzTEVBTO5+kvUqIG/FFb2 8GZBlK2pEefwndEvqfMBiE/dRe+hT0Hdua6WqaL26ffqSrI+sWI2XNUYkVwSwvME6o 0D2Xz01LggN+rtGFU66Sx6+RmpIcudUzW/WkkAi4= From: "james.hilliard1 at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/107843] New: error: incompatible type for argument in ___bpf_ctx_cast2 Date: Wed, 23 Nov 2022 17:37:33 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: james.hilliard1 at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107843 Bug ID: 107843 Summary: error: incompatible type for argument in ___bpf_ctx_cast2 Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: james.hilliard1 at gmail dot com Target Milestone: --- I'm seeing this error which does not occur in llvm for a bpf test(bpf_cubic= .c) in bpf-next: In file included from /home/buildroot/bpf-next/tools/testing/selftests/bpf/bpf_tcp_helpers.h:9, from progs/bpf_cubic.c:20: progs/bpf_cubic.c: In function 'bpf_cubic_cwnd_event': /home/buildroot/bpf-next/tools/bpf/resolve_btfids/libbpf/include/bpf/bpf_tr= acing.h:399:63: error: incompatible type for argument 3 of '____bpf_cubic_cwnd_event' 399 | #define ___bpf_ctx_cast2(x, args...) ___bpf_ctx_cast1(args), (void *)ctx[1] |=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 ^~~~~~~~~~~~~~ | | | void * /home/buildroot/bpf-next/tools/bpf/resolve_btfids/libbpf/include/bpf/bpf_he= lpers.h:187:29: note: in expansion of macro '___bpf_ctx_cast2' 187 | #define ___bpf_concat(a, b) a ## b | ^ /home/buildroot/bpf-next/tools/bpf/resolve_btfids/libbpf/include/bpf/bpf_he= lpers.h:190:29: note: in expansion of macro '___bpf_concat' 190 | #define ___bpf_apply(fn, n) ___bpf_concat(fn, n) | ^~~~~~~~~~~~~ /home/buildroot/bpf-next/tools/bpf/resolve_btfids/libbpf/include/bpf/bpf_tr= acing.h:410:39: note: in expansion of macro '___bpf_apply' 410 | #define ___bpf_ctx_cast(args...) ___bpf_apply(___bpf_ctx_cast, ___bpf_narg(args))(args) | ^~~~~~~~~~~~ /home/buildroot/bpf-next/tools/bpf/resolve_btfids/libbpf/include/bpf/bpf_tr= acing.h:435:27: note: in expansion of macro '___bpf_ctx_cast' 435 | return ____##name(___bpf_ctx_cast(args));=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 \ | ^~~~~~~~~~~~~~~ progs/bpf_cubic.c:189:6: note: in expansion of macro 'BPF_PROG' 189 | void BPF_PROG(bpf_cubic_cwnd_event, struct sock *sk, enum tcp_ca_ev= ent event) | ^~~~~~~~ progs/bpf_cubic.c:189:72: note: expected 'enum tcp_ca_event' but argument i= s of type 'void *' 189 | void BPF_PROG(bpf_cubic_cwnd_event, struct sock *sk, enum tcp_ca_ev= ent event) |=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20 ~~~~~~~~~~~~~~~~~~^~~~~ /home/buildroot/bpf-next/tools/bpf/resolve_btfids/libbpf/include/bpf/bpf_tr= acing.h:430:39: note: in definition of macro 'BPF_PROG' 430 | ____##name(unsigned long long *ctx, ##args);=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 \ | ^~~~ /home/buildroot/bpf-next/tools/bpf/resolve_btfids/libbpf/include/bpf/bpf_tr= acing.h:435:16: error: 'return' with a value, in function returning void [-Werror] 435 | return ____##name(___bpf_ctx_cast(args));=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 \ | ^~~~ progs/bpf_cubic.c:189:6: note: in expansion of macro 'BPF_PROG' 189 | void BPF_PROG(bpf_cubic_cwnd_event, struct sock *sk, enum tcp_ca_ev= ent event) | ^~~~~~~~ progs/bpf_cubic.c:189:15: note: declared here 189 | void BPF_PROG(bpf_cubic_cwnd_event, struct sock *sk, enum tcp_ca_ev= ent event) | ^~~~~~~~~~~~~~~~~~~~ /home/buildroot/bpf-next/tools/bpf/resolve_btfids/libbpf/include/bpf/bpf_tr= acing.h:431:17: note: in definition of macro 'BPF_PROG' 431 | typeof(name(0)) name(unsigned long long *ctx)=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 \ |=