[Bug c/115185] Missing "too long" warning when string-array size doesn't include NULL byte

2024-06-29 Thread Hi-Angel at yandex dot ru via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115185 --- Comment #10 from Konstantin Kharlamov --- (In reply to Alejandro Colomar from comment #7) > (In reply to Konstantin Kharlamov from comment #5) > > So basically -Wc++-compat warns about every heap memory allocation, of which > > there are doz

[Bug c/115185] Missing "too long" warning when string-array size doesn't include NULL byte

2024-06-29 Thread Hi-Angel at yandex dot ru via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115185 --- Comment #5 from Konstantin Kharlamov --- (In reply to Konstantin Kharlamov from comment #3) > (In reply to Andrew Pinski from comment #2) > > It is included in -Wc++-compat . > > Cool, thanks! I'll add the warning to the list we compile the

[Bug c/115684] No warning for pointer and enum field comparison

2024-06-27 Thread Hi-Angel at yandex dot ru via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115684 --- Comment #1 from Konstantin Kharlamov --- FWIW, IRL these cases happen during refactoring, when you factor out a code to a smaller function, and some variables from the original function become pointers. I honestly never even check the parame

[Bug c/115684] New: No warning for pointer and enum field comparison

2024-06-27 Thread Hi-Angel at yandex dot ru via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115684 Bug ID: 115684 Summary: No warning for pointer and enum field comparison Product: gcc Version: 14.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Componen

[Bug c/115185] Missing "too long" warning when string-array size doesn't include NULL byte

2024-05-22 Thread Hi-Angel at yandex dot ru via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115185 --- Comment #3 from Konstantin Kharlamov --- (In reply to Andrew Pinski from comment #2) > It is included in -Wc++-compat . Cool, thanks! I'll add the warning to the list we compile the project with, thank you!

[Bug c/115185] New: Missing "too long" warning when string-array size doesn't include NULL byte

2024-05-22 Thread Hi-Angel at yandex dot ru via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115185 Bug ID: 115185 Summary: Missing "too long" warning when string-array size doesn't include NULL byte Product: gcc Version: 14.1.1 Status: UNCONFIRMED Severity:

[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-15 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-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), l

[Bug c/111598] New: Wimplicit-fallthrough print for a code that is not compiled in

2023-09-26 Thread Hi-Angel at yandex dot ru via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111598 Bug ID: 111598 Summary: Wimplicit-fallthrough print for a code that is not compiled in Product: gcc Version: 13.2.1 Status: UNCONFIRMED Severity: normal

[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 --- Com

[Bug c++/92559] Returning std∷map breaks tail-recursion optimization

2021-07-24 Thread Hi-Angel at yandex dot ru via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92559 --- Comment #5 from Konstantin Kharlamov --- (In reply to Konstantin Kharlamov from comment #4) > By the way, FTR: I don't have the code anymore, but initially the problem > came from a real-life algorithm involving lots of state, which looked ba

[Bug c++/92559] Returning std∷map breaks tail-recursion optimization

2021-07-24 Thread Hi-Angel at yandex dot ru via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92559 --- Comment #4 from Konstantin Kharlamov --- By the way, FTR: I don't have the code anymore, but initially the problem came from a real-life algorithm involving lots of state, which looked barely readable when implemented in iterative way (i.e. a

[Bug c++/92559] Returning std∷map breaks tail-recursion optimization

2021-07-24 Thread Hi-Angel at yandex dot ru via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92559 --- Comment #3 from Konstantin Kharlamov --- (In reply to Andrew Pinski from comment #2) > I don't think this can ever be optimized. Mainly because there are copies > happening due to passing via value and returning by value. Please correct me

[Bug c/101525] New: "out of the bounds" warning for an Innocuous memset call with LTO

2021-07-20 Thread Hi-Angel at yandex dot ru via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101525 Bug ID: 101525 Summary: "out of the bounds" warning for an Innocuous memset call with LTO Product: gcc Version: 11.1.0 Status: UNCONFIRMED Severity: normal

[Bug middle-end/92718] [9/10/11/12 Regression] Bogus Wstringop-overflow in __builtin_memset() of an element of array of size 1 of struct

2021-07-20 Thread Hi-Angel at yandex dot ru via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92718 --- Comment #9 from Konstantin Kharlamov --- Omg, I am sorry, please ignore my comment. For some incomprehensible reason bugzilla circles through bug entries upon sending a comment. My comment here was supposed for another report, but then appare

[Bug middle-end/92718] [9/10/11/12 Regression] Bogus Wstringop-overflow in __builtin_memset() of an element of array of size 1 of struct

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

[Bug middle-end/93437] [9 Regression] bogus -Warray-bounds on protobuf generated code

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