On Sat, 2 Nov 2024, Martin Uecker wrote: > c: minor fixes related to arrays of unspecified size > > The patch for PR117145 and PR117245 also fixed PR100420 and PR116284 > which are bugs related to arrays of unspecified. Those are now > represented > as variable size arrays with size (0, 0). There are still some loose > ends, > which are resolved here by > > 1. adding a testcase for PR116284, > 2. moving code related to creation and detection of arrays of unspecified > sizes in their own functions, > 3. preferring a specified size over an unspecified size when forming > a composite type as required by C99 (PR118391) > 4. removing useless code in comptypes_internal and > composite_type_internal. > > PR c/116284 > PR c/117391 > > gcc/ChangeLog: > * c/c-tree.h (c_type_unspecified_p): New inline function. > * c/c-typeck.cc (c_build_array_type_unspecified): New function. > (comptypes_interal): Remove useless code. > (composite_type_internal): Update. > * c/c-decl.cc (grokdeclarator): Revise.
These should go in gcc/c/ChangeLog without the c/ prefix. > > gcc/testsuite/ChangeLog: > * gcc.dg/pr116284.c: New test. > * gcc.dg/pr117391.c: New test. The patch is OK with the above ChangeLog entry fix. -- Joseph S. Myers josmy...@redhat.com