Boost logo

Boost Users :

Subject: Re: [Boost-users] [wave] fail to parse variadics macro
From: gag maker (gagmaker_at_[hidden])
Date: 2014-03-31 18:29:45


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 <compiler.h> int main() {     return 0; } Also, here is a description for variadics from GNU docs: http://gcc.gnu.org/onlinedocs/cpp/Variadic-Macros.html , which corresponds with what I came across in compiler.h So, the question is, would wave process line 36 from compiler.h mentioned above the same way gcc process it? Thank you, --Alex On Monday, March 31, 2014 3:11 PM, Hartmut Kaiser <hartmut.kaiser_at_[hidden]> wrote: > 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_at_[hidden] http://lists.boost.org/mailman/listinfo.cgi/boost-users



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net