Overview
Features
Download
Documentation
Community
Add-Ons & Services

Building Poco with -pedantic

Please post support and help requests here.

Building Poco with -pedantic

Postby micke » 13 Feb 2013, 12:30

Hi,
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.

#define POCO_DECLARE_EXCEPTION(API, CLS, BASE) \
POCO_DECLARE_EXCEPTION_CODE(API, CLS, BASE, 0)

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.
micke
 
Posts: 1
Joined: 13 Feb 2013, 12:12

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".
alex
 
Posts: 1086
Joined: 11 Jul 2006, 16:27
Location: United_States


Return to Support

Who is online

Users browsing this forum: No registered users and 1 guest