Subject: Re: [Boost-bugs] [Boost C++ Libraries] #12995: Clang/C2 support
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2017-07-06 09:19:09
#12995: Clang/C2 support
-------------------------------+------------------------------------
Reporter: kaba <kaba@â¦> | Owner: No-Maintainer
Type: Bugs | Status: new
Milestone: To Be Determined | Component: preprocessor
Version: Boost 1.64.0 | Severity: Problem
Resolution: | Keywords: clang c2 visual studio
-------------------------------+------------------------------------
Changes (by steinar+boost@â¦):
* owner: (none) => No-Maintainer
* component: None => preprocessor
Comment:
From what I can see, this is primarily a bug in Boost.PP. Example code
that only #includes <boost/mpl/vector.hpp> and nothing more, under Clang
3.9.1 on Windows:
{{{
> clang-cl -I r:/ade/boost_1_64_0 test.cc
In file included from test.cc:1:
In file included from r:/ade/boost/boost_1_64_0\boost/mpl/vector.hpp:36:
In file included from
r:/ade/boost/boost_1_64_0\boost/mpl/vector/vector20.hpp:18:
In file included from
r:/ade/boost/boost_1_64_0\boost/mpl/vector/vector10.hpp:18:
In file included from
r:/ade/boost/boost_1_64_0\boost/mpl/vector/vector0.hpp:17:
In file included from
r:/ade/boost/boost_1_64_0\boost/mpl/vector/aux_/at.hpp:20:
r:/ade/boost/boost_1_64_0\boost/mpl/void.hpp(71,1): error: pasting formed
'BOOST_PP_TUPLE_ELEM_O_3(', an invalid
preprocessing token [-Winvalid-token-paste]
BOOST_MPL_AUX_NA_SPEC(1, is_void_)
^
r:/ade/boost/boost_1_64_0\boost/mpl/aux_/na_spec.hpp(161,40): note:
expanded from macro 'BOOST_MPL_AUX_NA_SPEC'
#define BOOST_MPL_AUX_NA_SPEC(i, name) \
^
r:/ade/boost/boost_1_64_0\boost/mpl/aux_/na_spec.hpp(154,47): note:
expanded from macro '\
BOOST_MPL_AUX_NA_SPEC_NO_ETI'
#define BOOST_MPL_AUX_NA_SPEC_NO_ETI(i, name) \
^
r:/ade/boost/boost_1_64_0\boost/mpl/aux_/na_spec.hpp(65,9): note:
expanded from macro '\
BOOST_MPL_AUX_NA_SPEC_MAIN'
BOOST_MPL_PP_NESTED_DEF_PARAMS_TAIL(i, typename T, na) \
^
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0
to see all)
r:/ade/boost/boost_1_64_0\boost/mpl/aux_/preprocessor/def_params_tail.hpp(82,11):
note: expanded from macro
'BOOST_MPL_PP_DEF_PARAMS_TAIL_IMPL'
BOOST_PP_SUB_D(1, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, i) \
^
r:/ade/boost/boost_1_64_0\boost/preprocessor/arithmetic/sub.hpp(46,37):
note: expanded from macro 'BOOST_PP_SUB_D'
# define BOOST_PP_SUB_D(d, x, y) BOOST_PP_SUB_D_I(d, x, y)
^
r:/ade/boost/boost_1_64_0\boost/preprocessor/arithmetic/sub.hpp(47,86):
note: expanded from macro 'BOOST_PP_SUB_D_I'
# define BOOST_PP_SUB_D_I(d, x, y) BOOST_PP_TUPLE_ELEM(2, 0,
BOOST_PP_WHILE_ ## d(BOOST_PP_SUB_P, BOOST_PP_SU...
^
In file included from test.cc:1:
In file included from r:/ade/boost/boost_1_64_0\boost/mpl/vector.hpp:36:
In file included from
r:/ade/boost/boost_1_64_0\boost/mpl/vector/vector20.hpp:18:
In file included from
r:/ade/boost/boost_1_64_0\boost/mpl/vector/vector10.hpp:18:
In file included from
r:/ade/boost/boost_1_64_0\boost/mpl/vector/vector0.hpp:17:
In file included from
r:/ade/boost/boost_1_64_0\boost/mpl/vector/aux_/at.hpp:20:
r:/ade/boost/boost_1_64_0\boost/mpl/void.hpp(71,23): error: too many
arguments provided to function-like macro
invocation
BOOST_MPL_AUX_NA_SPEC(1, is_void_)
^
r:/ade/boost/boost_1_64_0\boost/preprocessor/facilities/expand.hpp(26,10):
note: macro 'BOOST_PP_EXPAND_I' defined here
# define BOOST_PP_EXPAND_I(x) x
^
In file included from test.cc:1:
In file included from r:/ade/boost/boost_1_64_0\boost/mpl/vector.hpp:36:
In file included from
r:/ade/boost/boost_1_64_0\boost/mpl/vector/vector20.hpp:18:
In file included from
r:/ade/boost/boost_1_64_0\boost/mpl/vector/vector10.hpp:18:
In file included from
r:/ade/boost/boost_1_64_0\boost/mpl/vector/vector0.hpp:17:
In file included from
r:/ade/boost/boost_1_64_0\boost/mpl/vector/aux_/at.hpp:20:
r:/ade/boost/boost_1_64_0\boost/mpl/void.hpp(71,1): error: pasting formed
'BOOST_PP_TUPLE_ELEM_O_3(', an invalid
preprocessing token [-Winvalid-token-paste]
BOOST_MPL_AUX_NA_SPEC(1, is_void_)
[more errorsâ¦]
}}}
You can work around these immediate issues with -Wno-invalid-token-paste
(it's a warning that by default is an error). However, it doesn't fix
everything:
{{{
> clang-cl -Wno-invalid-token-paste -I r:/ade/boost_1_64_0 test.cc
In file included from test.cc:1:
In file included from r:/ade/boost_1_64_0\boost/mpl/vector.hpp:36:
In file included from
r:/ade/boost_1_64_0\boost/mpl/vector/vector20.hpp:18:
In file included from
r:/ade/boost_1_64_0\boost/mpl/vector/vector10.hpp:18:
In file included from r:/ade/boost_1_64_0\boost/mpl/vector/vector0.hpp:17:
In file included from r:/ade/boost_1_64_0\boost/mpl/vector/aux_/at.hpp:20:
r:/ade/boost_1_64_0\boost/mpl/void.hpp(71,23): error: too many arguments
provided to function-like macro invocation
BOOST_MPL_AUX_NA_SPEC(1, is_void_)
^
r:/ade/boost_1_64_0\boost/preprocessor/facilities/expand.hpp(26,10):
note: macro 'BOOST_PP_EXPAND_I' defined here
# define BOOST_PP_EXPAND_I(x) x
^
In file included from test.cc:1:
In file included from r:/ade/boost_1_64_0\boost/mpl/vector.hpp:36:
In file included from
r:/ade/boost_1_64_0\boost/mpl/vector/vector20.hpp:18:
In file included from
r:/ade/boost_1_64_0\boost/mpl/vector/vector10.hpp:18:
In file included from r:/ade/boost_1_64_0\boost/mpl/vector/vector0.hpp:17:
In file included from r:/ade/boost_1_64_0\boost/mpl/vector/aux_/at.hpp:20:
r:/ade/boost_1_64_0\boost/mpl/void.hpp(71,1): error: expected a qualified
name after 'typename'
BOOST_MPL_AUX_NA_SPEC(1, is_void_)
^
r:/ade/boost_1_64_0\boost/mpl/aux_/na_spec.hpp(161,40): note: expanded
from macro 'BOOST_MPL_AUX_NA_SPEC'
#define BOOST_MPL_AUX_NA_SPEC(i, name) \
^
r:/ade/boost_1_64_0\boost/mpl/aux_/na_spec.hpp(154,47): note: expanded
from macro '\
BOOST_MPL_AUX_NA_SPEC_NO_ETI'
#define BOOST_MPL_AUX_NA_SPEC_NO_ETI(i, name) \
^
r:/ade/boost_1_64_0\boost/mpl/aux_/na_spec.hpp(64,11): note: expanded
from macro '\
BOOST_MPL_AUX_NA_SPEC_MAIN'
BOOST_MPL_PP_PARAMS(i, typename T) \
^
r:/ade/boost_1_64_0\boost/mpl/aux_/preprocessor/params.hpp(58,11): note:
expanded from macro 'BOOST_MPL_PP_PARAMS'
, BOOST_MPL_PP_AUX_PARAM_FUNC \
^
In file included from test.cc:1:
In file included from r:/ade/boost_1_64_0\boost/mpl/vector.hpp:36:
In file included from
r:/ade/boost_1_64_0\boost/mpl/vector/vector20.hpp:18:
In file included from
r:/ade/boost_1_64_0\boost/mpl/vector/vector10.hpp:18:
In file included from r:/ade/boost_1_64_0\boost/mpl/vector/vector0.hpp:17:
In file included from r:/ade/boost_1_64_0\boost/mpl/vector/aux_/at.hpp:20:
r:/ade/boost_1_64_0\boost/mpl/void.hpp(71,1): error: expected ',' or '>'
in template-parameter-list
r:/ade/boost_1_64_0\boost/mpl/aux_/na_spec.hpp(161,40): note: expanded
from macro 'BOOST_MPL_AUX_NA_SPEC'
#define BOOST_MPL_AUX_NA_SPEC(i, name) \
^
r:/ade/boost_1_64_0\boost/mpl/aux_/na_spec.hpp(154,47): note: expanded
from macro '\
BOOST_MPL_AUX_NA_SPEC_NO_ETI'
#define BOOST_MPL_AUX_NA_SPEC_NO_ETI(i, name) \
^
#define BOOST_MPL_AUX_NA_SPEC(i, name) \
^
r:/ade/boost_1_64_0\boost/mpl/aux_/na_spec.hpp(154,47): note: expanded
from macro '\
BOOST_MPL_AUX_NA_SPEC_NO_ETI'
#define BOOST_MPL_AUX_NA_SPEC_NO_ETI(i, name) \
^
r:/ade/boost_1_64_0\boost/mpl/aux_/na_spec.hpp(64,11): note: expanded
from macro '\
BOOST_MPL_AUX_NA_SPEC_MAIN'
BOOST_MPL_PP_PARAMS(i, typename T) \
^
r:/ade/boost_1_64_0\boost/mpl/aux_/preprocessor/params.hpp(58,11): note:
expanded from macro 'BOOST_MPL_PP_PARAMS'
, BOOST_MPL_PP_AUX_PARAM_FUNC \
^
In file included from test.cc:1:
In file included from r:/ade/boost_1_64_0\boost/mpl/vector.hpp:36:
In file included from
r:/ade/boost_1_64_0\boost/mpl/vector/vector20.hpp:18:
In file included from
r:/ade/boost_1_64_0\boost/mpl/vector/vector10.hpp:18:
In file included from r:/ade/boost_1_64_0\boost/mpl/vector/vector0.hpp:17:
In file included from r:/ade/boost_1_64_0\boost/mpl/vector/aux_/at.hpp:20:
r:/ade/boost_1_64_0\boost/mpl/void.hpp(71,1): error: expected ',' or '>'
in template-parameter-list
r:/ade/boost_1_64_0\boost/mpl/aux_/na_spec.hpp(161,40): note: expanded
from macro 'BOOST_MPL_AUX_NA_SPEC'
#define BOOST_MPL_AUX_NA_SPEC(i, name) \
^
r:/ade/boost_1_64_0\boost/mpl/aux_/na_spec.hpp(154,47): note: expanded
from macro '\
BOOST_MPL_AUX_NA_SPEC_NO_ETI'
#define BOOST_MPL_AUX_NA_SPEC_NO_ETI(i, name) \
^
}}}
-- Ticket URL: <https://svn.boost.org/trac10/boost/ticket/12995#comment:1> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-07-06 09:22:31 UTC