On Mon, Aug 05, 2024 at 01:55:50PM GMT, Alejandro Colomar wrote: > Hi Martin, > > On Sun, Aug 04, 2024 at 11:39:26AM GMT, Martin Uecker wrote: > > > BTW, I still don't understand what `if (! TYPE_DOMAIN (type))` means, > > > within array_type_nelts_minus_one(). What code triggers that condition? > > > Am I missing error handling for that? Thanks! > > > > For incomplete arrays, basically we have the following different > > variants for arrays: > > > > T[ ] incomplete: !TYPE_DOMAIN > > T[1] constant size: TYPE_MAX_VALUE == INTEGER_CST > > T[n] variable size: TYPE_MAX_VALUE != INTEGER_CST > > T[0] flexible array member: !TYPE_MAX_VALUE && !C_TYPE_VARIABLE_SIZE > > (ISO version T[0] has TYPE_SIZE == NULL_TREE) > > T[*] unspecified variable size: !TYPE_MAX_VALUE && C_TYPE_VARIABLE_SIZE > > Could you describe the following types? I've repeated the ones you > already described, deduplicated some that have a different meaning in > different contexts, and added some multi-dimensional arrays. > > T[ ] (incomplete type; function parameter) > T[ ] (flexible array member) > T[0] (zero-size array) > T[0] (GNU flexible array member) > T[1] (old flexible array member) > T[7] (constant size) > T[7][n] (constant size with inner variable size) > T[7][*] (constant size with inner unspecified size)
And please also describe T[7][4], although I expect that to be just the same as T[7]. > T[n] (variable size) > T[*] (unspecified size) > > That would help with the [*] issues I'm investigating. I think > array_type_nelts_minus_one(T[7][*]) is not giving a constant expression, > and I'd like to fix that. > > Have a lovely day! > Alex > > -- > <https://www.alejandro-colomar.es/> -- <https://www.alejandro-colomar.es/>
signature.asc
Description: PGP signature