   # Field offsets must be aligned to the type of the field.
   for field in fields
     ty = field.type
+    unless ty.size
+      throw TypeError "cannot store unsized type `#{ty}' as a struct field"
     # Record the max view encountered to set as the view of this struct.
     maxView = ty.view if ty.view.BYTES_PER_ELEMENT > maxView.BYTES_PER_ELEMENT
     if (offset = field.offset)?

    first = @first.unwrapAll()
    return @computedType = if op is 'new' and first.value of o.types
      ty1 = o.types[first.value]
      throw TypeError 'cannot allocate type with size 0' unless ty1?.size
      Scope.root.needsMalloc = yes
      new PointerType ty1
    else if op is 'delete' and (ty1 = first.computedType)

PointerType::lint = (types) ->
  return this if @linted
  @linted = true
  @base = base = @base.lint types
  if base and not base.size
    throw TypeError "cannot take pointers of unsized type `#{base}'"
  this
PointerType::baseAlignment = -> @base?.view.BYTES_PER_ELEMENT or 1

