From 0efc759f2db66ff4e10bf383237cf430f45943c9 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Fri, 11 Feb 2011 15:46:03 +0900 Subject: [PATCH] Catch attempts to create a def with a null type. --- tools/qfcc/source/def.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/qfcc/source/def.c b/tools/qfcc/source/def.c index fd0567027..670693ace 100644 --- a/tools/qfcc/source/def.c +++ b/tools/qfcc/source/def.c @@ -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);