[wave] fail to parse variadics macro
Hi, I'm using wave library from boost 1.53.0. Library compiled with default settings, meaning BOOST_WAVE_SUPPORT_VARIADICS_PLACEMARKERS is set to 1 in wave_config.cpp Wave driver is also compiled to support variadics. However, when I try to feed translation unit to wave driver it reports following error: .../compiler.h:32:1: error: ill formed preprocessor directive: #define __builtin_warning(x, y...) (1) And btw, wave driver was called with --variadics option What went wrong here? Thank you, --Alex
I'm using wave library from boost 1.53.0. Library compiled with default settings, meaning BOOST_WAVE_SUPPORT_VARIADICS_PLACEMARKERS is set to 1 in wave_config.cpp
Wave driver is also compiled to support variadics.
However, when I try to feed translation unit to wave driver it reports following error: .../compiler.h:32:1: error: ill formed preprocessor directive: #define __builtin_warning(x, y...) (1)
And btw, wave driver was called with --variadics option
What went wrong here?
Since you have not provided a concise test case I can only guess... From the error message above I can tell, that you forgot the comma in fromnt of the ellipses: #define __builtin_warning(x, y, ...) Which will compile just fine. Regards Hartmut --------------- http://boost-spirit.com http://stellar.cct.lsu.edu
Thank you, Hartmut for prompt reply!
However, I am not forgetting anything as this definition comes from 'standard' header:
http://lxr.free-electrons.com/source/include/linux/compiler.h
see line 36:
# define __builtin_warning(x, y...) (1)
For a test case, trivial TU will suffice:
#include
I'm using wave library from boost 1.53.0. Library compiled with default settings, meaning BOOST_WAVE_SUPPORT_VARIADICS_PLACEMARKERS is set to 1 in wave_config.cpp
Wave driver is also compiled to support variadics.
However, when I try to feed translation unit to wave driver it reports following error: .../compiler.h:32:1: error: ill formed preprocessor directive: #define __builtin_warning(x, y...) (1)
And btw, wave driver was called with --variadics option
What went wrong here?
Since you have not provided a concise test case I can only guess... From the error message above I can tell, that you forgot the comma in fromnt of the ellipses: #define __builtin_warning(x, y, ...) Which will compile just fine. Regards Hartmut --------------- http://boost-spirit.com http://stellar.cct.lsu.edu _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
AMDG On 03/31/2014 12:46 PM, gag maker wrote:
However, when I try to feed translation unit to wave driver it reports following error: .../compiler.h:32:1: error: ill formed preprocessor directive: #define __builtin_warning(x, y...) (1)
Shouldn't that be #define __builtin_warning(x, y, ...) In Christ, Steven Watanabe
On 03/31/2014 03:13 PM, Steven Watanabe wrote:
AMDG
On 03/31/2014 12:46 PM, gag maker wrote:
However, when I try to feed translation unit to wave driver it reports following error: .../compiler.h:32:1: error: ill formed preprocessor directive: #define __builtin_warning(x, y...) (1)
Shouldn't that be
#define __builtin_warning(x, y, ...)
I thought the comma before the ... was optional. Eric
On 4/1/2014 3:51 PM, Eric Niebler wrote:
On 03/31/2014 03:13 PM, Steven Watanabe wrote:
AMDG
On 03/31/2014 12:46 PM, gag maker wrote:
However, when I try to feed translation unit to wave driver it reports following error: .../compiler.h:32:1: error: ill formed preprocessor directive: #define __builtin_warning(x, y...) (1)
Shouldn't that be
#define __builtin_warning(x, y, ...)
I thought the comma before the ... was optional.
My own interpretation of 16.3 paragraph 10 of the 2011 C++ standard (INCITS/ISO/IEC 14882-2011[2012]), given the 3rd #define listed there, is that the comma before the ... is not optional. Is there a further C++ standard or addendum for 2014 that has changed this ?
On 4/1/2014 1:21 PM, Edward Diener wrote:
On 4/1/2014 3:51 PM, Eric Niebler wrote:
On 03/31/2014 03:13 PM, Steven Watanabe wrote:
Shouldn't that be
#define __builtin_warning(x, y, ...)
I thought the comma before the ... was optional.
My own interpretation of 16.3 paragraph 10 of the 2011 C++ standard (INCITS/ISO/IEC 14882-2011[2012]), given the 3rd #define listed there, is that the comma before the ... is not optional. Is there a further C++ standard or addendum for 2014 that has changed this ?
I must've been thinking of C-style varargs, where the comma is optional before the .... Sorry for the noise. Eric
Hi All,
I'm asking my question again because I still haven't find any solution to it.
When try to build a python application using boost, I'm getting the following error using make.
/usr/local/boost_1_55_0/boost/type_traits/is_fundamental.hpp:26:20: fatal error: recursive template instantiation exceeded maximum depth
of 128
::boost::is_arithmetic<T>::value
I tried to use ./b2 cxxflags="-ftemplate-depth=256" as mentioned in this topic https://groups.google.com/forum/#!topic/boost-list/KJXwGcugNEs
but didn't make any difference.
Any idea? I'm really stock!
Thanks!
Corentin
Here is the full output.
[ 1%] Building CXX object src/CMakeFiles/pagmo_static.dir/problem/death_penalty.o
In file included from /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pagmo-code/src/problem/death_penalty.cpp:29:
In file included from /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pagmo-code/src/problem/../types.h:30:
In file included from /usr/local/boost_1_55_0/boost/lexical_cast.hpp:165:
In file included from /usr/local/boost_1_55_0/boost/type_traits/has_left_shift.hpp:43:
In file included from /usr/local/boost_1_55_0/boost/type_traits/detail/has_binary_operator.hpp:15:
/usr/local/boost_1_55_0/boost/type_traits/is_fundamental.hpp:26:20: fatal error: recursive template instantiation exceeded maximum depth
of 128
::boost::is_arithmetic<T>::value
^
/usr/local/boost_1_55_0/boost/type_traits/is_fundamental.hpp:38:64: note: in instantiation of template class
'boost::detail::is_fundamental_impl<const double>' requested here
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_fundamental,T,::boost::detail::is_fundamental_impl<T>::value)
^
/usr/local/boost_1_55_0/boost/type_traits/detail/bool_trait_def.hpp:69:30: note: expanded from macro 'BOOST_TT_AUX_BOOL_TRAIT_DEF1'
BOOST_TT_AUX_BOOL_C_BASE(C) \
^
/usr/local/boost_1_55_0/boost/type_traits/detail/bool_trait_def.hpp:63:81: note: expanded from macro 'BOOST_TT_AUX_BOOL_C_BASE'
# define BOOST_TT_AUX_BOOL_C_BASE(C) : public ::boost::integral_constant
On 4/2/2014 10:24 PM, Corentin Hamel wrote:
Hi All,
I'm asking my question again because I still haven't find any solution to it.
You'll get more traction if: (a) You don't reply to a random message in another thread, which causes threaded mail and news readers (i.e. pretty much all of them) to bury your message where it won't be found, and (b) You put the name of the library that's giving you problems in the subject line. Please take the time to read this: http://www.boost.org/community/policy.html Eric
On 3/31/2014 3:46 PM, gag maker wrote:
Hi,
I'm using wave library from boost 1.53.0. Library compiled with default settings, meaning BOOST_WAVE_SUPPORT_VARIADICS_PLACEMARKERS is set to 1 in wave_config.cpp
Wave driver is also compiled to support variadics.
However, when I try to feed translation unit to wave driver it reports following error: .../compiler.h:32:1: error: ill formed preprocessor directive: #define __builtin_warning(x, y...) (1)
The form '#define __builtin_warning(x, y...)' is not a standard C++ variadic macro but rather a gcc extension to the variadic macro syntax. Since Wave's intention is to follow the C++ standard as closely as possible it is not surprising that it gives an error when processing that non-standard form.
And btw, wave driver was called with --variadics option
What went wrong here?
participants (6)
-
Corentin Hamel
-
Edward Diener
-
Eric Niebler
-
gag maker
-
Hartmut Kaiser
-
Steven Watanabe