Building Poco with -pedantic

Please post support and help requests here.
Posts: 1
Joined: 13 Feb 2013, 12:12

Building Poco with -pedantic

Postby micke » 13 Feb 2013, 12:30

I'm trying to build Poco 1.4.5 using -pedantic (or actually -pedantic-errors), and I have problems with some pre-processor macros in Foundation/include/Poco/Exception.h. Seems that a define here causes problems (compiler complains about empty macro arguments which is undefined behavior on C90/C++98 I think).

This code compiles (not sure if it's correct but initial tests seems to work) with GCC 4.3.4 but not GCC 4.4.2.


I tried to skip this the POCO_DECLARE_EXCEPTION wrapper macro and use the _CODE directly in all the places where this macro is used, which silences the compiler but I'm not sure if this is the correct way of solving it. I cannot remove -pedantic or bump the C++ standard used when compiling so I have to solve this in Poco I assume. Any pointers are appreciated, cheers.

Posts: 1375
Joined: 11 Jul 2006, 16:27
Location: United_States

Re: Building Poco with -pedantic

Postby alex » 27 Feb 2013, 22:38

I tried to compile (g++ 4.6.3 on ubuntu) with -pedantic-errors and had no problem with exception macros. However, pcre is the showstopper:

Code: Select all

** Compiling src/pcre_chartables.c (debug, shared)
In file included from src/pcre_chartables.c:23:0:
src/pcre_config.h:274:32: error: C++ style comments are not allowed in ISO C90

We embed external sources "as is".

Return to “Support”

Who is online

Users browsing this forum: Baidu [Spider] and 2 guests