Hi folks,

Elementary has one compile problem about Elm_Prefs_Item_Spec_Void which is 
intended to 0 size structure.
But basically this is only valid for C  but not for C++ because of nature of 
C++ mechanism. (it has 1 byte at least)
There is a tricky code to make the Elm_Prefs_Item_Spec_Void structure has 0 
sized  by doing this "int:0;"
but it's only valid for gcc compiler (as far as i know) but not in other c++ 
compilers such as clang.

Im not perfectly sure(so asking you), but for the compatibility among the 
language/compilers, 
It should has one dummy member always like this,

struct _Elm_prefs_Item_Spec_Void
{
   char dummy;
}

Otherwise, If you can say, it doesn't have any compatibility problem at all, 
then we can avoid this compile warning problem by this (*roughly).

#if C++
struct _Elm_prefs_Item_Spec_Void
{
}
#else
struct _Elm_prefs_Item_Spec_Void
{
   char dummy;
}
#end

What do you think?



------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to