EmitC: Allow arrays of size zero (#123292)

This is allowed as a GCC extension, see
https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html.
This commit is contained in:
Matthias Gehre
2025-01-17 09:06:04 +01:00
committed by GitHub
parent 1181921482
commit 0bd0765252
4 changed files with 7 additions and 11 deletions

View File

@@ -16,6 +16,8 @@ The following convention is followed:
floating types.
* If `__bf16` is used, the code requires a compiler that supports it, such as
GCC or Clang.
* If `emitc.array` with a dimension of size zero is used, then the code
requires [a GCC extension](https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html).
* Else the generated code is compatible with C99.
These restrictions are neither inherent to the EmitC dialect itself nor to the