[Bug target/108189] anonymous struct declared inside parameter list will not be visible outside of this definition or declaration

2024-05-07 Thread dxu at dxuuu dot xyz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108189 --- Comment #14 from Daniel Xu --- Yeah, I saw that. But that only makes the build not fail right? For bpftrace we are trying hard to be warning-free. FWIW I tried adding `-std=gnu2x` and it didn't help.

[Bug target/108189] anonymous struct declared inside parameter list will not be visible outside of this definition or declaration

2024-05-06 Thread jemarch at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108189 --- Comment #13 from Jose E. Marchesi --- In bpf-next we are passing -Wno-error for the particular BPF selftests that use this construct: progs/btf_dump_test_case_bitfields.c-CFLAGS := -Wno-error progs/btf_dump_test_case_namespacing.c-CFLAGS :=

[Bug target/108189] anonymous struct declared inside parameter list will not be visible outside of this definition or declaration

2024-05-06 Thread dxu at dxuuu dot xyz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108189 Daniel Xu changed: What|Removed |Added CC||dxu at dxuuu dot xyz --- Comment #12 from D

[Bug target/108189] anonymous struct declared inside parameter list will not be visible outside of this definition or declaration

2022-12-22 Thread james.hilliard1 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108189 --- Comment #11 from James Hilliard --- (In reply to Andrew Pinski from comment #1) > The error is correct at least for C before C23. Can you clarify where exactly in the C23 specification that this will be allowed?

[Bug target/108189] anonymous struct declared inside parameter list will not be visible outside of this definition or declaration

2022-12-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108189 --- Comment #10 from Andrew Pinski --- (In reply to James Hilliard from comment #8) > Yeah, clang with -std=gnu17 -pedantic doesn't even complain at all from the > looks of it. Does it make sense to allow disabling this specific warning in > GC

[Bug target/108189] anonymous struct declared inside parameter list will not be visible outside of this definition or declaration

2022-12-20 Thread james.hilliard1 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108189 --- Comment #9 from James Hilliard --- (In reply to Andrew Pinski from comment #5) > Also Clang does not implement this warning at all. > > It is a bug in bpf-next really. What would be the correct way to fix these in bpf-next?

[Bug target/108189] anonymous struct declared inside parameter list will not be visible outside of this definition or declaration

2022-12-20 Thread james.hilliard1 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108189 --- Comment #8 from James Hilliard --- (In reply to Andrew Pinski from comment #7) > Yes the warning is really still correct even if a closer testcase would be: > ``` > int f(struct {int t;} *b) > { > return b->t; > } > > int f1(void *a) > {

[Bug target/108189] anonymous struct declared inside parameter list will not be visible outside of this definition or declaration

2022-12-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108189 --- Comment #7 from Andrew Pinski --- Yes the warning is really still correct even if a closer testcase would be: ``` int f(struct {int t;} *b) { return b->t; } int f1(void *a) { return f(a); } ``` I am actually shocked clang didn't impleme

[Bug target/108189] anonymous struct declared inside parameter list will not be visible outside of this definition or declaration

2022-12-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108189 Andrew Pinski changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug target/108189] anonymous struct declared inside parameter list will not be visible outside of this definition or declaration

2022-12-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108189 --- Comment #5 from Andrew Pinski --- Also Clang does not implement this warning at all. It is a bug in bpf-next really.

[Bug target/108189] anonymous struct declared inside parameter list will not be visible outside of this definition or declaration

2022-12-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108189 --- Comment #4 from Andrew Pinski --- Also Clang does not implement this warning at all. It is a bug in bpf-next really.

[Bug target/108189] anonymous struct declared inside parameter list will not be visible outside of this definition or declaration

2022-12-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108189 --- Comment #3 from Andrew Pinski --- GCC does not implement all of C2X yet.

[Bug target/108189] anonymous struct declared inside parameter list will not be visible outside of this definition or declaration

2022-12-20 Thread james.hilliard1 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108189 --- Comment #2 from James Hilliard --- (In reply to Andrew Pinski from comment #1) > The error is correct at least for C before C23. Hmm, seeing it with -std=gnu2x passed still: /home/buildroot/opt/cross/bin/bpf-gcc -g -Werror -D__TARGET_ARCH_

[Bug target/108189] anonymous struct declared inside parameter list will not be visible outside of this definition or declaration

2022-12-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108189 --- Comment #1 from Andrew Pinski --- The error is correct at least for C before C23.