On Mon, May 16, 2016 at 04:13:36PM +0200, Joerg Bornkessel wrote:
device.c: In destructor ‘virtual cIptvDevice::~cIptvDevice()’:
common.h:54:20: error: ‘typeof’ was not declared in this scope
        typeof(*ptr) *tmp = ptr;  \
device.c:62:3: note: in expansion of macro ‘DELETE_POINTER’

It looks like the definition of the macro DELETE_POINTER is not expanding to valid C++. Since C++11 (ISO/IEC 14882:2011), similar functionality is available in the standard, but the keyword is decltype, not typeof. The typeof keyword was a non-standard GNU extension.

According to the answers in http://stackoverflow.com/questions/14130774/difference-between-decltype-and-typeof the "typeof" keyword cannot be directly replaced with "decltype", in case the expression is a reference. It would seem to me that the macro should be redefined by using the "auto" keyword, something like this:

        auto tmp = ptr;

It looks like all the errors that you posted are due to the same macro definition.

i think this comes from the, up from gcc-4.9, -std=gnu11 as default C

Right. Instead of patching the source, you could also try to work around the issues by specifying -std=gnu++03 or -std=gnu++98.

        Marko Mäkelä

vdr mailing list

Reply via email to