diff options
author | Martin Uecker <uecker@tugraz.at> | 2024-11-01 10:15:44 +0100 |
---|---|---|
committer | Martin Uecker <uecker@gcc.gnu.org> | 2024-11-09 11:28:27 +0100 |
commit | 114abf075c1e28358173756042049c9992ae6572 (patch) | |
tree | b3cba26f42a35465580ee6341838c41d78075eed /gcc/function.cc | |
parent | 9c8f3d5e7d5ee64ffe5c50a72b087227f2e8f957 (diff) | |
download | gcc-114abf075c1e28358173756042049c9992ae6572.zip gcc-114abf075c1e28358173756042049c9992ae6572.tar.gz gcc-114abf075c1e28358173756042049c9992ae6572.tar.bz2 |
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 size. 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/c/ChangeLog:
* c-tree.h (c_type_unspecified_p): New inline function.
* c-typeck.cc (c_build_array_type_unspecified): New function.
(comptypes_interal): Remove useless code.
(composite_type_internal): Update.
* c-decl.cc (grokdeclarator): Revise.
gcc/testsuite/ChangeLog:
* gcc.dg/pr116284.c: New test.
* gcc.dg/pr117391.c: New test.
Diffstat (limited to 'gcc/function.cc')
0 files changed, 0 insertions, 0 deletions