enginmanap / limonEngine

3D FPS game engine with full dynamic lighting and shadows
http://www.limonengine.com
GNU Lesser General Public License v3.0
580 stars 57 forks source link

__attribute__((unused)) tags break VS builds #87

Closed enginmanap closed 4 years ago

enginmanap commented 5 years ago

It should be replaced by a macro

XenialDan commented 5 years ago

Same for __attribute((unused))

onurblt commented 4 years ago

So it should be disabled by a macro if it is a Visual Studio build ? For example:

#ifdef _MSC_VER
#define TAG 
#else
#define TAG __attribute__((unused))
#endif
enginmanap commented 4 years ago

Actually, attribute was a gcc extension, but now it is part of the C++ standart. C++14 doesn't have unused defined, but the standart allows implementations define their own. So all instances of the old version should be replaced with this: [[gnu::unused]]

onurblt commented 4 years ago

Would not [[gnu::unused]] be a problem for Visual Studio?

enginmanap commented 4 years ago

No, the standart says unknown extensions should be ignored.

onurblt commented 4 years ago

Ok then, I will replace them