From a4d090d50dca12716fbca0cc738e692a0db75068 Mon Sep 17 00:00:00 2001 From: Jung-uk Kim Date: Fri, 5 Apr 2019 22:45:01 +0000 Subject: Import ACPICA 20190405. --- source/compiler/aslxref.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'source/compiler/aslxref.c') 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) -- cgit v1.2.3