Commit 89ecd499 authored by Matthias Braun's avatar Matthias Braun
Browse files

move FIRM_NOTHROW, FIRM_PRINTF to obstack.h header

They are really special cases for obstack_printf, we don't need them for
all of libfirm.
parent 5923b85e
......@@ -501,6 +501,27 @@ __extension__ \
#endif /* not __GNUC__ or not __STDC__ */
/** @def FIRM_NOTHROW
* tells that a function does not throw C++ exceptions. Currently this is only
* necessary for obstack_printf to avoid nameclashes when linking with glibc
* which has an obstack library with NOTHROW builtin. */
#ifdef __cplusplus
# define FIRM_NOTHROW throw ()
#else
# define FIRM_NOTHROW
#endif
/**
* @def FIRM_PRINTF
* Attribute with marks a function to have a printf style format
* string and variadic argument.
*/
#if defined(__GNUC__)
# define FIRM_PRINTF(a,b) __attribute__((__format__(__printf__, a, b)))
#else
# define FIRM_PRINTF(a,b)
#endif
/** prints formated string (printf-style format) to an obstack.
* This is done by "growing" the obstack with the obstack_*grow*
* functions. Note: Does NOT append a null-byte. */
......
......@@ -48,23 +48,6 @@
#define FIRM_API extern
#endif
#ifdef __cplusplus
# define FIRM_NOTHROW throw ()
#else
# define FIRM_NOTHROW
#endif
/**
* @def FIRM_PRINTF
* Attribute with marks a function to have a printf style format
* string and variadic argument.
*/
#if defined(__GNUC__)
# define FIRM_PRINTF(a,b) __attribute__((__format__(__printf__, a, b)))
#else
# define FIRM_PRINTF(a,b)
#endif
#endif
/* mark declarations as C function (note that we always need this,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment