If we create an empty enum and try to copy this type, it fails.
Because of:
nalloc is 0, so the allocation returns an empty pointer.
In our usecase this was silently failing and way after it is segfaulting.
We were trying to create a compound type containing an empty enum.
It works and fails later when trying to use the Compound Type. https://github.com/HDFGroup/hdf5/blob/develop/src/H5Tcompound.c#L476 The error here is silently ignored (type is 0).
So, is it normal it fails for this reason, or should it be fixed?
If it is a normal failing should we look to make the error happened earlier.