Re: vdr-plugin-iptv-2.2.1 fails on compile

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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’
  DELETE_POINTER(pIptvSectionM);

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
standard.

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
vdr@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr




[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux