eal: fix support for older gcc versions
[dpdk.git] / lib / librte_eal / common / include / rte_debug.h
index 8f3ba6e..675378e 100644 (file)
@@ -85,7 +85,11 @@ void rte_dump_registers(void);
  * documentation.
  */
 void __rte_panic(const char *funcname , const char *format, ...)
+#ifdef __GNUC__
+#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 2))
        __attribute__((cold))
+#endif
+#endif
        __attribute__((noreturn))
        __attribute__((format(printf, 2, 3)));