v1.21
v1.21 (30th September 2019):
-
Fix bug where token pasting two numeric tokens did not yield a numeric token. Thanks
to Sei-Lisa for reporting this. -
BREAKING CHANGE: Paths emitted by pcpp into
#line
directives now are relative to the
working directory of the process whenPreprocessor
is initialised. This includes
added search paths - files included from those locations will be emitted with a sequence
of../
to relativise the path emitted. If no path exists between the working
directory and the path of the file being emitted, an absolute path is emitted instead.If you wish to disable this new behaviour, or use different behaviour, you can
customise the newrewrite_paths
member variable ofPreprocessor
. -
Fix bug where
__LINE__
was expanding into the line number of its definition instead
of its use. Thanks to Sei-Lisa for reporting this. -
Add
--passthru-magic-macros
command line option. -
BREAKING CHANGE: The
PreprocessorHooks
andOutputDirective
interface has
changed. One now must specify the kind ofOutputDirective
abort one wants, and one
can now both ignore AND remove directives.on_directive_handle()
and
on_directive_unknown()
now take an extra parameterprecedingtoks
, these are the
tokens from the#
up to the directive. -
Fix a corner case where
FUNC(void)foo()
expanded tovoidfoo()
and not
void foo()
which is a very common non-conforming extension of the C preprocessor.
Thanks to OmegaDoom for reporting this. -
Add tokens for all the C operators, to help implementation of an expression evaluator.
-
Updated embedded ply to HEAD (2019-04-25)
-
Fix
#include
not working if no-I
parameters were supplied. Thanks to csm10495
for reporting this.