add deprecated warnings for {.deadcodeelim: on.} (#21277)

This commit is contained in:
ringabout 2023-02-16 13:34:32 +08:00 • committed by GitHub
commit 93e4f278a1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -929,7 +929,8 @@ proc singlePragma(c: PContext, sym: PSym, n: PNode, i: var int,
of wThreadVar: of wThreadVar:
noVal(c, it) noVal(c, it)
incl(sym.flags, {sfThread, sfGlobal}) incl(sym.flags, {sfThread, sfGlobal})
of wDeadCodeElimUnused: discard # deprecated, dead code elim always on of wDeadCodeElimUnused:
warningDeprecated(c.config, n.info, "'{.deadcodeelim: on.}' is deprecated, now a noop") # deprecated, dead code elim always on
of wNoForward: pragmaNoForward(c, it) of wNoForward: pragmaNoForward(c, it)
of wReorder: pragmaNoForward(c, it, flag = sfReorder) of wReorder: pragmaNoForward(c, it, flag = sfReorder)
of wMagic: processMagic(c, it, sym) of wMagic: processMagic(c, it, sym)