diff options
author | Araq <rumpf_a@web.de> | 2015-06-30 12:50:24 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2015-06-30 12:50:24 +0200 |
commit | 28de800d6148065fd3e6344f7255e793298be399 (patch) | |
tree | 8aec27c13cd99be3c9e3d3abef45e1d183db996b /compiler/sempass2.nim | |
parent | 4cfe216a776ffef61380c1c5f2d61aff7315c122 (diff) | |
parent | 3312d49a489e50e5c5f2275f7c0e400208eb8a5d (diff) | |
download | Nim-28de800d6148065fd3e6344f7255e793298be399.tar.gz |
Merge branch 'more_concurrency' into devel
Conflicts: doc/tut1.txt lib/core/locks.nim lib/pure/collections/tables.nim lib/pure/selectors.nim
Diffstat (limited to 'compiler/sempass2.nim')
-rw-r--r-- | compiler/sempass2.nim | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/sempass2.nim b/compiler/sempass2.nim index 12c4a7c7b..0358ed51a 100644 --- a/compiler/sempass2.nim +++ b/compiler/sempass2.nim @@ -241,9 +241,10 @@ proc useVar(a: PEffects, n: PNode) = message(n.info, warnUninit, s.name.s) # prevent superfluous warnings about the same variable: a.init.add s.id - if {sfGlobal, sfThread} * s.flags == {sfGlobal} and s.kind in {skVar, skLet}: + if {sfGlobal, sfThread} * s.flags != {} and s.kind in {skVar, skLet}: if s.guard != nil: guardGlobal(a, n, s.guard) - if (tfHasGCedMem in s.typ.flags or s.typ.isGCedMem): + if {sfGlobal, sfThread} * s.flags == {sfGlobal} and + (tfHasGCedMem in s.typ.flags or s.typ.isGCedMem): #if warnGcUnsafe in gNotes: warnAboutGcUnsafe(n) markGcUnsafe(a, s) |