|
Boost Users : |
Subject: Re: [Boost-users] [signals2] compilation issues with gcc4.4 and -pedantic
From: sguazt (marco.guazzone_at_[hidden])
Date: 2011-05-12 10:50:30
On Thu, May 12, 2011 at 11:03 AM, Christophe Bourez <boost_at_[hidden]> wrote:
> The following code:
>
> #include <boost/signals2.hpp>
> int main(int , char *[]) { return 0; }
>
> compiles fine with gcc-4.1 and gcc-4.2 and the -pedantic option, but
> generates the following errors using gcc-4.4 with the same compiling
> options:
>
> /home/build/repository/boost-1.46.1-2/gcc-4.4/include/boost/signals2/detail/preprocessed_arg_type_template.hpp:21:
> error: invoking macro BOOST_SIGNALS2_PREFIXED_ARGS_TEMPLATE_DECL argument 2:
> empty macro arguments are undefined in ISO C90 and ISO C++98
> /home/build/repository/boost-1.46.1-2/gcc-4.4/include/boost/signals2/detail/preprocessed_arg_type_template.hpp:21:
> error: invoking macro BOOST_PP_CAT argument 1: empty macro arguments are
> undefined in ISO C90 and ISO C++98
> /home/build/repository/boost-1.46.1-2/gcc-4.4/include/boost/signals2/detail/preprocessed_arg_type_template.hpp:21:
> error: invoking macro BOOST_PP_CAT_I argument 1: empty macro arguments are
> undefined in ISO C90 and ISO C++98
>
> Adding the option -std=c++0x removes these errors, but I am supporting
> legacy code that does not compile with -std=c++0x
>
> Is there any workaround or patch I could apply ?
>
Hi,
I don't get the error of the OP, but (after having done svn "update")
if now I try to compile the above code with GCC 4.5.1, I get another
error:
--- [error] ---
In file included from
./boost/preprocessor/iteration/detail/iter/forward1.hpp:47:0,
from ./boost/signals2/preprocessed_signal.hpp:27,
from ./boost/signals2/signal.hpp:36,
from ./boost/signals2.hpp:19,
from foobar.cpp:1:
./boost/signals2/detail/signal_template.hpp:329:118: error: expected
; before BOOST_PP_EMPTY
In file included from
./boost/preprocessor/iteration/detail/iter/forward1.hpp:47:0,
from ./boost/signals2/preprocessed_signal.hpp:27,
from ./boost/signals2/signal.hpp:36,
from ./boost/signals2.hpp:19,
from foobar.cpp:1:
./boost/signals2/detail/signal_template.hpp:341:11: error: expected
; before result_type
--- [/error] ---
Worked fine with boost-trunk just an hour ago (approximately)
Cheers,
-- Marco
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