[signals2] compilation issues with gcc4.4 and -pedantic

The following code:
#include

On Thu, May 12, 2011 at 11:03 AM, Christophe Bourez
The following code:
#include
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

On Thu, May 12, 2011 at 4:50 PM, sguazt
On Thu, May 12, 2011 at 11:03 AM, Christophe Bourez
wrote: The following code:
#include
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:
[cut]
Cheers,
Sorry, I've just redone "svn update" and now with the new changes all work fine. Thank you very much! Best, -- Marco

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Thursday, May 12, 2011, Christophe Bourez wrote:
The following code:
#include
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/deta il/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
It should be fixed in trunk now. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAk3L+dQACgkQ5vihyNWuA4XDkACfW1RBRvty1Ofci3SICvFbPDqY bBUAn0tOGSJDZTXFF1wq/Z2YXXpFl45I =fja8 -----END PGP SIGNATURE-----
participants (3)
-
Christophe Bourez
-
Frank Mori Hess
-
sguazt