﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	revision
536	GCC_VERSION should not be defined in the header file	Marcin Sobieszczanski	Alpar Juttner	"lemon/core.h (re-)defines GCC_VERSION that is visible to all files that include LEMON headers.

In case a user project uses lemon/core.h (indirectly) and defines its own GCC_VERSION tag (that isn't compatible with LEMON's definition -- GCC_VERSION isn't reserved), this causes a warning that cannot be suppressed. And so warning elevation cannot be used (-Werror).

IMHO, LEMON should defer from (re-)defining its own GCC_VERSION. I suggest the following patch:

--- lemon/core.h.orig   2014-11-24 10:29:17.996837046 +0000
+++ lemon/core.h        2014-11-24 10:32:41.471925566 +0000
@@ -37,13 +37,7 @@
 #pragma warning( disable : 4250 4355 4503 4800 4996 )
 #endif

-#ifdef __GNUC__
-#define GCC_VERSION (__GNUC__ * 10000                   \
-                     + __GNUC_MINOR__ * 100             \
-                     + __GNUC_PATCHLEVEL__)
-#endif
-
-#if GCC_VERSION >= 40800
+#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)
 // Needed by the [DI]GRAPH_TYPEDEFS marcos for gcc 4.8
 #pragma GCC diagnostic ignored ""-Wunused-local-typedefs""
 #endif
"	defect	closed	major	LEMON 1.4 release	core	hg main	fixed			
