Jakub Jelinek <ja...@redhat.com> writes: > Hi! > > The following testcase build with -ftrack-macro-expansion=0, > but don't build otherwise. The problem seems to be that > the libcpp for macro redefinition warning/error purposes if it sees > more than one paste operator adds those extra CPP_PASTE tokens at the end, > after normal tokens from the macro. For -ftrack-macro-expansion=0 we were > using macro_real_token_count (macro) to only use the real tokens for macro > expansion purposes, but for track_macro_expansion it used macro->count, > which includes also the extra tokens. > > Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, > ok for trunk (and after a while for 4.8)?
For what it's worth, this is OK for me, yes. Though I am just a casual contributor giving my point of view here. > > 2014-02-18 Jakub Jelinek <ja...@redhat.com> > > PR preprocessor/58844 > * macro.c (enter_macro_context): Only push > macro_real_token_count (macro) tokens rather than > macro->count tokens, regardless of > CPP_OPTION (pfile, track-macro-expansion). > > * c-c++-common/cpp/pr58844-1.c: New test. > * c-c++-common/cpp/pr58844-2.c: New test. Thanks. -- Dodji