[cvs-nhc98] patch applied (cpphs): Bugfix: #undef caused an
infinite loop
Malcolm Wallace
Malcolm.Wallace at cs.york.ac.uk
Thu Sep 3 17:34:44 EDT 2009
Thu Sep 3 02:13:25 PDT 2009 Malcolm.Wallace at cs.york.ac.uk
* Bugfix: #undef caused an infinite loop
Ignore-this: 449791949546c4ffa141fe22ddfa34c5
Cause: #undef was being translated into a SymbolReplacement where the
replacement is the same as the original identifier. This used to work,
until we switched on recursive expansion of SymbolReplacements.
Fix: Introduce a different HashDefine constructor (AntiDefined) to
handle #undef, rather than piggypacking on SymbolReplacement.
M ./Language/Preprocessor/Cpphs/CppIfdef.hs -1 +1
M ./Language/Preprocessor/Cpphs/HashDefine.hs -2 +6
M ./Language/Preprocessor/Cpphs/MacroPass.hs +1
M ./tests/runtests +1
A ./tests/undef.hs
View patch online:
http://darcs.haskell.org/cpphs/_darcs/patches/20090903091325-6871e-3e48959fce789ef5ebdace261481464530aa8075.gz
More information about the Cvs-nhc98
mailing list