(find_tag): find external references, we can't handle those, so tell

user that instead of crashing


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15659 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2005-07-19 14:21:28 +00:00
parent c2f3dcf61d
commit c77f5c2515

View File

@@ -32,6 +32,7 @@
*/
#include "gen_locl.h"
#include "lex.h"
RCSID("$Id$");
@@ -160,6 +161,14 @@ find_tag (const Type *t,
*tag = t->tag.tagvalue;
break;
case TType:
if ((t->symbol->stype == Stype && t->symbol->type == NULL)
|| t->symbol->stype == SUndefined) {
error_message("%s is imported or still undefined, "
" can't generate tag checking data in CHOICE "
"without this information",
t->symbol->name);
exit(1);
}
find_tag(t->symbol->type, cl, ty, tag);
return;
case TUTCTime: