[Bug c/105660] [12 Regression] ICE in warn_parm_array_mismatch when merging two function decls and VLA arguments since r12-1218-gc6503fa93b5565c9

2023-11-03 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105660 uecker at gcc dot gnu.org changed: What|Removed |Added Status|NEW |RESOLVED

[Bug c/110703] Incorrect "-Wfloat-conversion" diagnostic with _Generic

2023-11-03 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110703 uecker at gcc dot gnu.org changed: What|Removed |Added Status|NEW |RESOLVED

[Bug ipa/96503] attribute alloc_size effect lost after inlining

2023-11-03 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96503 uecker at gcc dot gnu.org changed: What|Removed |Added CC||uecker at gcc dot gnu.org

[Bug c/111708] Calling external global function instead of local static function.

2023-11-03 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111708 uecker at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED

[Bug c/98536] warning with -Wvla-parameter for unspecified bound getting specified later

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

[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/70418] VM structure type specifier in list of parameter declarations within nested function definition ices.

2023-11-03 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70418 uecker at gcc dot gnu.org changed: What|Removed |Added CC||uecker at gcc dot gnu.org

[Bug c/109970] -Wstringop-overflow should work with parameter forward declarations

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

[Bug tree-optimization/88443] [meta-bug] bogus/missing -Wstringop-overflow warnings

2023-11-03 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88443 Bug 88443 depends on bug 109970, which changed state. Bug 109970 Summary: -Wstringop-overflow should work with parameter forward declarations https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109970 What|Removed

[Bug c/109450] VLA struct definition vs use in the function declaration

2023-11-03 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109450 uecker at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED

[Bug c/84510] C front-end does not utilise -Wuseless-cast

2023-11-03 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84510 uecker at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Target

[Bug c/101604] [meta-bug] bogus/missing -Wvla-parameter

2023-11-03 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101604 Bug 101604 depends on bug 98536, which changed state. Bug 98536 Summary: warning with -Wvla-parameter for unspecified bound getting specified later https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98536 What|Removed

[Bug c/91038] ICE with VLA type and statement expression (gimplify_var_or_parm_decl)

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

[Bug c/68193] _Generic -Woverflow false alarm

2023-11-03 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68193 uecker at gcc dot gnu.org changed: What|Removed |Added Resolution|--- |FIXED CC|

[Bug c/109450] VLA struct definition vs use in the function declaration

2023-11-03 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109450 uecker at gcc dot gnu.org changed: What|Removed |Added CC||uecker at gcc dot gnu.org

[Bug tree-optimization/112419] [14 Regression] gcc.dg/Wnonnull-4.c excess error for 32-bit targets

2023-11-06 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112419 uecker at gcc dot gnu.org changed: What|Removed |Added Ever confirmed|0 |1 See Also|

[Bug c++/112377] Implement -Walloc-size in c++

2023-11-04 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112377 uecker at gcc dot gnu.org changed: What|Removed |Added Last reconfirmed||2023-11-04

[Bug c++/112377] Implement -Walloc-size in c++

2023-11-04 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112377 uecker at gcc dot gnu.org changed: What|Removed |Added Severity|normal |enhancement

[Bug c/98541] warning with -Wnonnull for array parameter with bound > 0

2023-11-04 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98541 uecker at gcc dot gnu.org changed: What|Removed |Added Known to fail||11.0 Resolution|---

[Bug sanitizer/113878] missed optimization with sanitizer and signed integer overflow

2024-02-11 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113878 --- Comment #4 from uecker at gcc dot gnu.org --- Would it make sense to add the instrumentation earlier? Then it could be optimized as usual which may give better results. Just adding a test explicitly shows that this works:

[Bug sanitizer/113878] missed optimization with sanitizer and signed integer overflow

2024-02-11 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113878 --- Comment #6 from uecker at gcc dot gnu.org --- My idea would be to explicitly add either traps or __builtin_unreachable whenever there is UB that can be checked for in the C FE, and not add sanitizer calls (that may return). Just a

[Bug sanitizer/113878] missed optimization with sanitizer and signed integer overflow

2024-02-11 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113878 --- Comment #8 from uecker at gcc dot gnu.org --- (In reply to Jakub Jelinek from comment #7) > (In reply to uecker from comment #6) > > My idea would be to explicitly add either traps or __builtin_unreachable > > whenever there is UB that can

[Bug sanitizer/113878] missed optimization with sanitizer and signed integer overflow

2024-02-11 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113878 uecker at gcc dot gnu.org changed: What|Removed |Added CC||uecker at gcc dot gnu.org

[Bug c/88737] RFE: Track ownership moves

2023-12-17 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88737 --- Comment #10 from uecker at gcc dot gnu.org --- I would say it is rather likely that C will get something like this at some point. BTW: Any use of the pointer value after free as in comment #2 is UB.

[Bug c/112840] feature request: warn on incorrect tagged union value access

2023-12-17 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112840 uecker at gcc dot gnu.org changed: What|Removed |Added CC||uecker at gcc dot gnu.org

[Bug c/102558] missing warning comparing T[static N] to null

2023-12-17 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102558 uecker at gcc dot gnu.org changed: What|Removed |Added Target Milestone|--- |14.0 CC|

[Bug c/112488] [14 Regression] ICE in make_ssa_name_fn with VLA inside type and inlining since r14-1142

2023-12-13 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112488 uecker at gcc dot gnu.org changed: What|Removed |Added Status|NEW |RESOLVED

[Bug c/102558] missing warning comparing T[static N] to null

2023-12-17 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102558 uecker at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED

[Bug c/102939] Ridiculously long compilation times on (admittedly itself ridiculous) pointer declaration

2023-12-17 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102939 uecker at gcc dot gnu.org changed: What|Removed |Added Target Milestone|--- |14.0 CC|

[Bug lto/112716] LTO optimization with struct of variable ssize

2023-11-26 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112716 uecker at gcc dot gnu.org changed: What|Removed |Added CC||uecker at gcc dot gnu.org

[Bug lto/112716] LTO optimization with struct with variable size

2023-11-27 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112716 --- Comment #7 from uecker at gcc dot gnu.org --- (In reply to rguent...@suse.de from comment #6) > On Mon, 27 Nov 2023, muecker at gwdg dot de wrote: > > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112716 > > > > --- Comment #5 from Martin

[Bug c/113492] ICE: in composite_type_internal, at c/c-typeck.cc:557 with -std=c2x -funsigned-bitfields since r14-6808

2024-01-31 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113492 uecker at gcc dot gnu.org changed: What|Removed |Added Status|NEW |RESOLVED

[Bug c/113438] ICE (segfault) in dwarf2out_decl with -g -std=c23 on c23-tag-composite-2.c

2024-01-31 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113438 uecker at gcc dot gnu.org changed: What|Removed |Added Resolution|--- |FIXED

[Bug c/113688] verify_type fails for compatible structs with FAM in C23

2024-01-31 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113688 uecker at gcc dot gnu.org changed: What|Removed |Added Last reconfirmed||2024-01-31

[Bug c/113688] New: verify_type fails for compatible structs with FAM in C23

2024-01-31 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113688 Bug ID: 113688 Summary: verify_type fails for compatible structs with FAM in C23 Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal

[Bug c/113688] verify_type fails for compatible structs with FAM in C23

2024-01-31 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113688 uecker at gcc dot gnu.org changed: What|Removed |Added Target Milestone|--- |14.0 See Also|

[Bug c/113492] [14 Regression] ICE: in composite_type_internal, at c/c-typeck.cc:557 with -std=c2x -funsigned-bitfields since r14-6808

2024-01-19 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113492 uecker at gcc dot gnu.org changed: What|Removed |Added CC||uecker at gcc dot gnu.org

[Bug c/113438] ICE (segfault) in dwarf2out_decl with -g -std=c23 on c23-tag-composite-2.c

2024-01-23 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113438 --- Comment #4 from uecker at gcc dot gnu.org --- Created attachment 57194 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57194=edit preliminary patch

[Bug c/113492] [14 Regression] ICE: in composite_type_internal, at c/c-typeck.cc:557 with -std=c2x -funsigned-bitfields since r14-6808

2024-01-20 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113492 --- Comment #6 from uecker at gcc dot gnu.org --- The point is that no existing code is broken by this because it was rejected previously and now this only affects very new C23 code using bit-fields in different structs that a declared in

[Bug c/113492] [14 Regression] ICE: in composite_type_internal, at c/c-typeck.cc:557 with -std=c2x -funsigned-bitfields since r14-6808

2024-01-20 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113492 --- Comment #4 from uecker at gcc dot gnu.org --- Yes, it is just weird because similar bugs for other new language features, e.g. an ICE for BitInt are not labeled as a regression and are P3.

[Bug c/113492] ICE: in composite_type_internal, at c/c-typeck.cc:557 with -std=c2x -funsigned-bitfields since r14-6808

2024-01-20 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113492 --- Comment #9 from uecker at gcc dot gnu.org --- No need to dig it up, I believe you. I was just wondering.

[Bug c/113492] ICE: in composite_type_internal, at c/c-typeck.cc:557 with -std=c2x -funsigned-bitfields since r14-6808

2024-01-20 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113492 --- Comment #11 from uecker at gcc dot gnu.org --- Created attachment 57175 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57175=edit patch Untested patch.

[Bug c/113438] ICE (segfault) in dwarf2out_decl with -g -std=c23 on c23-tag-composite-2.c

2024-01-20 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113438 uecker at gcc dot gnu.org changed: What|Removed |Added Target|aarch64-*-* | --- Comment #3 from uecker

[Bug c/113492] ICE: in composite_type_internal, at c/c-typeck.cc:557 with -std=c2x -funsigned-bitfields since r14-6808

2024-01-20 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113492 --- Comment #10 from uecker at gcc dot gnu.org --- Removing the assertion is enough to fix it. But the cause is strange. We somehow get two unsigned types in DECL_BIT_FIELD_TYPE which should be the same but are not, e.g: constant 32>

[Bug testsuite/112419] [14 Regression] gcc.dg/Wnonnull-4.c excess error for 32-bit targets

2023-11-15 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112419 --- Comment #4 from uecker at gcc dot gnu.org --- I was a bit busy. My idea would have been to split the file up into warnings for Wnonnull and Wstringop. Your patch should work though (but I can't approve).

[Bug c/112571] New: ICE with nested redefinition of enum

2023-11-16 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112571 Bug ID: 112571 Summary: ICE with nested redefinition of enum Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c

[Bug c/112571] ICE with nested redefinition of enum

2023-11-16 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112571 --- Comment #1 from uecker at gcc dot gnu.org --- Another example: enum X : typeof(enum X { A });

[Bug c/112488] [14 Regression] ICE in make_ssa_name_fn with VLA inside type and inlining since r14-1142

2023-11-13 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112488 --- Comment #6 from uecker at gcc dot gnu.org --- So adding back the DECL_EXPR ( TYPE_DECL (t) ) in finish_struct fixes it, but I am not sure this is completely correct...

[Bug c/112488] [14 Regression] ICE in make_ssa_name_fn with VLA inside type and inlining since r14-1142

2023-11-13 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112488 --- Comment #7 from uecker at gcc dot gnu.org --- And this example also fails with this fix: extern void abort(void); int test(int *n, struct T { char a[*n], b[*n]; }*) { return sizeof(struct T) - sizeof(struct T); } void f1(int *p) { if

[Bug c/107557] [12/13/14 Regression] ICE -fsanitize=undefined and VLA as argument type to a function

2023-11-14 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107557 uecker at gcc dot gnu.org changed: What|Removed |Added CC||uecker at gcc dot gnu.org

[Bug middle-end/95507] [meta-bug] bogus/missing -Wnonnull

2023-11-11 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95507 Bug 95507 depends on bug 112428, which changed state. Bug 112428 Summary: Wnonnull outputs wrong type https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112428 What|Removed |Added

[Bug c/112428] Wnonnull outputs wrong type

2023-11-11 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112428 uecker at gcc dot gnu.org changed: What|Removed |Added CC||uecker at gcc dot gnu.org

[Bug c/110815] [static] not as useful as the nonnull attribute

2023-11-11 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110815 uecker at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED

[Bug c/112488] [14 Regression] ICE in make_ssa_name_fn with VLA inside type and inlining since r14-1142

2023-11-13 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112488 --- Comment #5 from uecker at gcc dot gnu.org --- Oh well, more to fix. I wonder whether we could validate the trees created by the front-end FE somehow.

[Bug lto/114574] [14 regression] ICE when building curl with LTO (fld_incomplete_type_of, at ipa-free-lang-data.cc:257) since r14-9763

2024-04-03 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114574 --- Comment #6 from uecker at gcc dot gnu.org --- Hm, this is enough: const struct S * x; struct S {}; void f(const struct S **); The TYPE_CANONICAL of the pointer type depends on TYPE_CANONICAL of the target. So it seems if I set it for

[Bug lto/114574] [14 regression] ICE when building curl with LTO (fld_incomplete_type_of, at ipa-free-lang-data.cc:257) since r14-9763

2024-04-03 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114574 --- Comment #7 from uecker at gcc dot gnu.org --- What is strange is that not updating TYPE_CANONICAL also seems wrong even before C23, because then it seems we should be able to get pointers with different TYPE_CANONICAL which are compatible

[Bug lto/114574] [14 regression] ICE when building curl with LTO (fld_incomplete_type_of, at ipa-free-lang-data.cc:257) since r14-9763

2024-04-04 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114574 --- Comment #8 from uecker at gcc dot gnu.org --- If we do not care too much about TYPE_CANONICAL being correct in this case anyway, we could turn off the test and add a condition flag_isoc23 as a precaution in the FE to not risk any other

[Bug lto/114574] [14 regression] ICE when building curl with LTO (fld_incomplete_type_of, at ipa-free-lang-data.cc:257) since r14-9763

2024-04-04 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114574 --- Comment #10 from uecker at gcc dot gnu.org --- Yes, this makes sense. I will try this. (I tried this approach already but I did not get this work, probably because something I missed). Otherwise one could try setting TYPE_CANONICAL only

[Bug c/46116] Allow passing of anonymous aggregates when signature matches

2024-04-02 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46116 uecker at gcc dot gnu.org changed: What|Removed |Added CC||uecker at gcc dot gnu.org

[Bug c/114361] ICE with c23 related to completion of incomplete structure types

2024-04-02 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114361 uecker at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED

[Bug c/114361] ICE with c23 related to completion of incomplete structure types

2024-04-20 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114361 uecker at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED

[Bug c/90253] no warning for cv-qualified selectors in _Generic

2024-04-14 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90253 uecker at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|

[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 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/114731] -Wincompatible-pointer-types false positive in combination with _Generic(3)

2024-04-16 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114731 uecker at gcc dot gnu.org changed: What|Removed |Added CC||uecker at gcc dot gnu.org

[Bug c/114731] -Wincompatible-pointer-types false positive in combination with _Generic(3)

2024-04-16 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114731 --- Comment #16 from uecker at gcc dot gnu.org --- Your example program is indeed not conforming and violates a constraint because you pass a pointer of type that can not be assigned to the type of the argument. So a diagnostic is required and

[Bug lto/114574] [14 regression] ICE when building curl with LTO (fld_incomplete_type_of, at ipa-free-lang-data.cc:257) since r14-9763

2024-04-12 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114574 --- Comment #26 from uecker at gcc dot gnu.org --- Note that not updating the types seems wrong also pre C23. PR114493 could be an example of this: typedef struct a a; int c; int f(a **); struct __attribute__((__may_alias__)) a {};

[Bug lto/114574] [14 regression] ICE when building curl with LTO (fld_incomplete_type_of, at ipa-free-lang-data.cc:257) since r14-9763

2024-04-12 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114574 --- Comment #28 from uecker at gcc dot gnu.org --- I do not fully understand yet what happens for may_alias, but it if we later complete the struct with the may_alias attribute it seems we would also need to update the previously created

[Bug c/114927] [14/15 Regression] ICE when building Emacs with -std=c23 -flto (error: ‘TYPE_CANONICAL’ has different ‘TYPE_CANONICAL’)

2024-05-02 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114927 uecker at gcc dot gnu.org changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill

[Bug c/114831] typeof doesn't evaluate expression when it has variably modified type in some cases

2024-05-18 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114831 uecker at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|

[Bug c/115109] Incorrect type of enumeration constant in redeclaration of enumeration constant (C23)

2024-05-18 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115109 --- Comment #2 from uecker at gcc dot gnu.org --- PATCH: https://gcc.gnu.org/pipermail/gcc-patches/2024-May/652093.html

[Bug analyzer/114896] analyzer: false-positive with VLA (analyzer-out-of-bounds, CWE-121)

2024-05-18 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114896 uecker at gcc dot gnu.org changed: What|Removed |Added CC||uecker at gcc dot gnu.org

[Bug c/115109] Incorrect type of enumeration constant in redeclaration of enumeration constant (C23)

2024-05-19 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115109 --- Comment #5 from uecker at gcc dot gnu.org --- Right, included the wrong test... The conversion seems right, if we have a predefined type. For enums with fixed underlying type we then have a constraint violation if the value does not fit.

[Bug c/115109] Incorrect type of enumeration constant in redeclaration of enumeration constant (C23)

2024-05-19 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115109 --- Comment #6 from uecker at gcc dot gnu.org --- But it shows that the logic is still not right for the case where all the final types should be int.

[Bug c/115109] Incorrect type of enumeration constant in redeclaration of enumeration constant (C23)

2024-05-19 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115109 --- Comment #7 from uecker at gcc dot gnu.org --- PATCH v2 https://gcc.gnu.org/pipermail/gcc-patches/2024-May/652109.html

[Bug tree-optimization/115157] incorrect TBAA for derived types involving enum types

2024-05-19 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115157 uecker at gcc dot gnu.org changed: What|Removed |Added CC||uecker at gcc dot gnu.org