[3.7] bpo-1875: Raise SyntaxError in invalid blocks that will be optimised away (GH-13332) by miss-islington · Pull Request #13382 · python/cpython

@pablogsal @miss-islington

…away (pythonGH-13332)

Move the check for dead conditionals (if 0) to the peephole optimizer
and make sure that the code block is still compiled to report any
existing syntax errors within.
(cherry picked from commit af8646c)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>

pablogsal