diff options
author | Jung-uk Kim <jkim@FreeBSD.org> | 2019-04-05 22:45:01 +0000 |
---|---|---|
committer | Jung-uk Kim <jkim@FreeBSD.org> | 2019-04-05 22:45:01 +0000 |
commit | a4d090d50dca12716fbca0cc738e692a0db75068 (patch) | |
tree | 13c8f19a527d6be9080917cf0bddbfe06103e99f /source/compiler/aslxref.c | |
parent | 222d1f49264d00972299c6ff23de8100be561897 (diff) |
Notes
Diffstat (limited to 'source/compiler/aslxref.c')
-rw-r--r-- | source/compiler/aslxref.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/source/compiler/aslxref.c b/source/compiler/aslxref.c index 99f6c4a07c0b..9d6e5c0bc68a 100644 --- a/source/compiler/aslxref.c +++ b/source/compiler/aslxref.c @@ -1185,6 +1185,24 @@ XfNamespaceLocateBegin ( } } + /* + * 5) Check for external resolution + * By this point, everything should be loaded in the namespace. If a + * namespace lookup results in a namespace node that is an external, it + * means that this named object was not defined in the input ASL. This + * causes issues because there are plenty of incidents where developers + * use the external keyword to suppress compiler errors about undefined + * objects. Note: this only applies when compiling multiple definition + * blocks. + */ + if (AslGbl_ParseTreeRoot->Asl.Child && AslGbl_ParseTreeRoot->Asl.Child->Asl.Next && + (Op->Asl.ParseOpcode != PARSEOP_EXTERNAL && + Op->Asl.Parent->Asl.ParseOpcode != PARSEOP_EXTERNAL) && + (Node->Flags & ANOBJ_IS_EXTERNAL)) + { + AslError (ASL_ERROR, ASL_MSG_UNDEFINED_EXTERNAL, Op, NULL); + } + /* 5) Check for a connection object */ #if 0 else if (Op->Asl.Parent->Asl.ParseOpcode == PARSEOP_CONNECTION) |