summaryrefslogtreecommitdiff
path: root/gcc/d/dmd/dscope.d
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/d/dmd/dscope.d')
-rw-r--r--gcc/d/dmd/dscope.d2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/d/dmd/dscope.d b/gcc/d/dmd/dscope.d
index c3a1d05cd7b..6339a9e36ba 100644
--- a/gcc/d/dmd/dscope.d
+++ b/gcc/d/dmd/dscope.d
@@ -457,6 +457,8 @@ struct Scope
if (sc.scopesym.isModule())
flags |= SearchUnqualifiedModule; // tell Module.search() that SearchLocalsOnly is to be obeyed
+ else if (sc.flags & SCOPE.Cfile && sc.scopesym.isStructDeclaration())
+ continue; // C doesn't have struct scope
if (Dsymbol s = sc.scopesym.search(loc, ident, flags))
{