Catch attempts to create a def with a null type.

This commit is contained in:
Bill Currie 2011-02-11 15:46:03 +09:00
parent 5f3c1872b9
commit 0efc759f2d

View file

@ -103,6 +103,9 @@ new_def (const char *name, type_t *type, defspace_t *space,
if (!space && storage != st_extern)
internal_error (0, "non-external def with no storage space");
if (!type)
internal_error (0, "attempt to create def '%s' with a null type",
name);
def->return_addr = __builtin_return_address (0);