From: Clifford Wolf Date: Tue, 14 Oct 2014 22:56:04 +0000 (+0200) Subject: Define empty __attribute__ macro for non-gcc, non-clang compilers X-Git-Tag: yosys-0.4~52^2~8 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=069521e2d5d5568739c7e8d7db31859bb88965a6;p=yosys.git Define empty __attribute__ macro for non-gcc, non-clang compilers --- diff --git a/kernel/log.h b/kernel/log.h index d4b21110c..e0c8f7ba0 100644 --- a/kernel/log.h +++ b/kernel/log.h @@ -52,19 +52,11 @@ extern int log_verbose_level; void logv(const char *format, va_list ap); void logv_header(const char *format, va_list ap); -#if !defined(__GNUC__) && !defined(__clang__) - void logv_error(const char *format, va_list ap); - void log(const char *format, ...); - void log_header(const char *format, ...); - void log_error(const char *format, ...); - void log_cmd_error(const char *format, ...); -#else - void logv_error(const char *format, va_list ap) __attribute__((noreturn)); - void log(const char *format, ...) __attribute__((format(printf, 1, 2))); - void log_header(const char *format, ...) __attribute__((format(printf, 1, 2))); - void log_error(const char *format, ...) __attribute__((format(printf, 1, 2))) __attribute__((noreturn)); - void log_cmd_error(const char *format, ...) __attribute__((format(printf, 1, 2))) __attribute__((noreturn)); -#endif +void logv_error(const char *format, va_list ap) __attribute__((noreturn)); +void log(const char *format, ...) __attribute__((format(printf, 1, 2))); +void log_header(const char *format, ...) __attribute__((format(printf, 1, 2))); +void log_error(const char *format, ...) __attribute__((format(printf, 1, 2))) __attribute__((noreturn)); +void log_cmd_error(const char *format, ...) __attribute__((format(printf, 1, 2))) __attribute__((noreturn)); void log_spacer(); void log_push(); diff --git a/kernel/yosys.h b/kernel/yosys.h index 5a37dd3c5..37d3e52f4 100644 --- a/kernel/yosys.h +++ b/kernel/yosys.h @@ -77,6 +77,10 @@ # define FINAL #endif +#if !defined(__GNUC__) && !defined(__clang__) +# define __attribute__(...) +#endif + YOSYS_NAMESPACE_BEGIN namespace RTLIL {