zserio icon indicating copy to clipboard operation
zserio copied to clipboard

Consider to implement warning if array size can be bigger than varsize

Open mikir opened this issue 4 years ago • 0 comments

If the variable array uses array size which can hold bigger value than the upper bound limit of varsize type, compiler could fire a warning that such schema does not have to be portable for all languages/platforms.

Compiler could give a hint to use varsize instead.

Example:

struct VariableArray
{
    varuint numElements;
    uint8   uint8Array[numElements];
};

mikir avatar Jun 10 '20 09:06 mikir