#789329 libboost-wave-dev: Requesting the activation of BOOST_WAVE_SUPPORT_MS_EXTENSIONS compilation flag

Package:
libboost-wave-dev
Source:
boost-defaults
Description:
C99/C++ preprocessor library (default version)
Submitter:
Vincent Hobeïka
Date:
2015-09-28 08:51:03 UTC
Severity:
wishlist
#789329#5
Date:
2015-06-19 20:25:06 UTC
From:
To:
Package: libboost-wave-dev
Severity: wishlist

Dear Debian Boost Team,

First, I would like to thank you for your hard work and quality
packages.

I am the sponsored maintainer of the vera++ package. This package
has a dependency over libboost-wave.

It has been decided upstream to recompile boost wave with vera++ in
order to activate the BOOST_WAVE_SUPPORT_MS_EXTENSIONS cxx flag so
vera++ would be able to parse specific windows identifiers
(__stdcall, __declspec, …). See issue #58¹.

It is indeed nice for vera++ to be able to parse those identifiers
correctly so a Debian server checking source files from windows
developers would correctly report errors related to these
tokens. For instance, there are users of vera++ who runs a svn hook
which refuses commits of source files with bad coding style.

Could it be possible to add the BOOST_WAVE_SUPPORT_MS_EXTENSIONS=1
flag for the compilation of boost wave, please? If not can you
please explain why?

I have checked the BTS if any demands regarding the
BOOST_WAVE_SUPPORT_MS_EXTENSIONS compilation flag for boost wave
have been asked in the past and could not find anything. Is there
anything in Debian which could prevent the activation of this flag
(apart from we never had the need before)?

It would be a pity for Debian to ship a degraded version of
vera++. Moreover, I think it would not be in accordance to the
policy for my package to build its own boost-wave library.

In case you cannot add the previously mentionned flag, what would
be the best practice here?

Thanks in advance for your time.

Best regards,

#789329#10
Date:
2015-06-21 09:08:38 UTC
From:
To:
found unstable
affects vera++
thanks

#789329#19
Date:
2015-06-28 19:23:41 UTC
From:
To:
I looked at the wave library code and none of the source files actually contain
the string BOOST_WAVE_SUPPORT_MS_EXTENSIONS.  Some of the headers, do,
certainly.  But I began to wonder whether this option is something that can be
selected by the library user rather than the library builder.  Did you try
simply building vera++ with this flag against the existing Boost.Wave library?

#789329#24
Date:
2015-09-28 08:46:19 UTC
From:
To:
Hi,
"Steve M. Robbins" <steve@sumost.ca> writes:
I took some time to review and test what you told me.

I was thrilled when I read your suggestions. Yet after some testing
it appeared that it does not work:

[vincent][0]~/tmp/vera++-1.3.0/build$ ctest -R RuleDUMP -V | grep stdcall
72: 4/0 identifier__stdcall
--------^
72: 4/0 msext_stdcall__stdcall
Errors while running CTest

So I tried to understand why this flag was tied to the compilation options of boost.

After some research in the code I have come to realise that the
BOOST_WAVE_SUPPORT_MS_EXTENSIONS flag is used to is the
BOOST_WAVE_CONFIG define which is a mask of bits:

http://sources.debian.net/src/boost1.55/1.55.0%2Bdfsg-4/boost/wave/wave_config_constant.hpp/?hl=61#L61

This define is used to provide some tests in order to check the configuration of the calling application:
http://sources.debian.net/src/boost1.55/1.55.0%2Bdfsg-4/libs/wave/src/wave_config_constant.cpp/?hl=37#L37

But it doesn't seem to be the real problem…

After further research I have come up to the following. lexertl::init_data() is a templated function involving
the BOOST_WAVE_SUPPORT_MS_EXTENSIONS flag too:

http://sources.debian.net/src/boost1.55/1.55.0%2Bdfsg-4/libs/wave/samples/list_includes/lexertl/lexertl_lexer.hpp/?hl=328#L186

My guess is that the code containing the tokens that vera++ needs is
stripped in the non templated version of this function during the
compilation of boost wave.

http://sources.debian.net/src/boost1.55/1.55.0+dfsg-4/libs/wave/samples/list_includes/lexertl/lexertl_lexer.hpp/?hl=328#L328

Thus, it seems I don't have many solutions here. It seems that if
BOOST_WAVE_SUPPORT_MS_EXTENSIONS is not activated when compiling
boost wave, there will be no chances for vera++ to catch these
precious tokens.

Could anyone here with better knowledge and understanding of boost
wave could confirm this please?

Is there any problem setting this flag in boost wave for debian?

Thanks in advance.

Best regards,
--
Vincent Hobeïka