[Bug c/97100] -Wformat checks all arms of _Generic leading to irrelevant type expectation warnings

2024-04-16 Thread alx at kernel dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97100 --- Comment #14 from Alejandro Colomar --- Hi Martin, For the discussion of my -Wincompatible-pointer-types reproducer, please visit . I'll reply to you there, since it's more on-topic, and

[Bug c/97100] -Wformat checks all arms of _Generic leading to irrelevant type expectation warnings

2024-04-16 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97100 --- Comment #13 from Martin Uecker --- A C compiler has to diagnose all constraint violations. Alternatively, it could also reject the program with an error.

[Bug c/97100] -Wformat checks all arms of _Generic leading to irrelevant type expectation warnings

2024-04-16 Thread Hi-Angel at yandex dot ru via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97100 --- Comment #12 from Konstantin Kharlamov --- (In reply to Martin Uecker from comment #11) > A conforming C compiler has to diagnose all violations of constraints with > the same correct type of x in all branches (not the type it would have in >

[Bug c/97100] -Wformat checks all arms of _Generic leading to irrelevant type expectation warnings

2024-04-16 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97100 --- Comment #11 from Martin Uecker --- A conforming C compiler has to diagnose all violations of constraints with the same correct type of x in all branches (not the type it would have in another context where a different is taken).

[Bug c/97100] -Wformat checks all arms of _Generic leading to irrelevant type expectation warnings

2024-04-16 Thread Hi-Angel at yandex dot ru via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97100 --- Comment #10 from Konstantin Kharlamov --- (In reply to uecker from comment #9) > Some warnings are then even required to be standard compliant. I just searched through the C standard and no warnings seem to be required by it. The only place

[Bug c/97100] -Wformat checks all arms of _Generic leading to irrelevant type expectation warnings

2024-04-16 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97100 --- Comment #9 from uecker at gcc dot gnu.org --- x is - according to the C standard - always whatever it is in the controlling expression. Some warnings are then even required to be standard compliant. Note that this also does not have to be

[Bug c/97100] -Wformat checks all arms of _Generic leading to irrelevant type expectation warnings

2024-04-15 Thread Hi-Angel at yandex dot ru via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97100 --- Comment #8 from Konstantin Kharlamov --- (In reply to uecker from comment #7) > Fundamentally, the program is that _Generic is not ideally designed for this > use case. Why? > One could consider an extension > > _Generic(x, int i: f(i),

[Bug c/97100] -Wformat checks all arms of _Generic leading to irrelevant type expectation warnings

2024-04-15 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97100 --- Comment #7 from uecker at gcc dot gnu.org --- The fix suppresses certain warnings which are guarded by a flag, but it is not always clear whether a specific warning should be suppressed or not in dead code. You could also always add a

[Bug c/97100] -Wformat checks all arms of _Generic leading to irrelevant type expectation warnings

2024-04-15 Thread alx at kernel dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97100 --- Comment #6 from Alejandro Colomar --- Oh well, in my case it is -Wincompatible-pointer-types. Maybe the fix was only for -Wformat.

[Bug c/97100] -Wformat checks all arms of _Generic leading to irrelevant type expectation warnings

2024-04-15 Thread alx at kernel dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97100 Alejandro Colomar changed: What|Removed |Added CC||alx at kernel dot org --- Comment

[Bug c/97100] -Wformat checks all arms of _Generic leading to irrelevant type expectation warnings

2023-11-03 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97100 uecker at gcc dot gnu.org changed: What|Removed |Added Target Milestone|--- |14.0 Known to fail|

[Bug c/97100] -Wformat checks all arms of _Generic leading to irrelevant type expectation warnings

2023-08-05 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97100 --- Comment #3 from CVS Commits --- The master branch has been updated by Martin Uecker : https://gcc.gnu.org/g:54be338589ea93ad4ff53d22adde476a0582537b commit r14-3004-g54be338589ea93ad4ff53d22adde476a0582537b Author: Martin Uecker Date:

[Bug c/97100] -Wformat checks all arms of _Generic leading to irrelevant type expectation warnings

2023-08-04 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97100 Martin Uecker changed: What|Removed |Added CC||muecker at gwdg dot de --- Comment #2

[Bug c/97100] -Wformat checks all arms of _Generic leading to irrelevant type expectation warnings

2023-07-17 Thread Hi-Angel at yandex dot ru via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97100 Konstantin Kharlamov changed: What|Removed |Added CC||Hi-Angel at yandex dot ru ---