newlib-2.1.0
git-svn-id: svn://kolibrios.org@4921 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
@@ -34,9 +34,7 @@
|
||||
#define _BEGIN_STD_C extern "C" {
|
||||
#define _END_STD_C }
|
||||
#endif
|
||||
#if defined(__GNUC__) && \
|
||||
( (__GNUC__ >= 4) || \
|
||||
( (__GNUC__ >= 3) && defined(__GNUC_MINOR__) && (__GNUC_MINOR__ >= 3) ) )
|
||||
#if __GNUC_PREREQ (3, 3)
|
||||
#define _NOTHROW __attribute__ ((nothrow))
|
||||
#else
|
||||
#define _NOTHROW throw()
|
||||
@@ -113,21 +111,34 @@
|
||||
to emit the function body unless the address is explicitly
|
||||
taken. However this behaviour is changing to match the C99
|
||||
standard, which uses 'extern inline' to indicate that the
|
||||
function body *must* be emitted. If we are using GCC, but do
|
||||
not have the new behaviour, we need to use extern inline; if
|
||||
we are using a new GCC with the C99-compatible behaviour, or
|
||||
a non-GCC compiler (which we will have to hope is C99, since
|
||||
there is no other way to achieve the effect of omitting the
|
||||
function if it isn't referenced) we just use plain 'inline',
|
||||
which c99 defines to mean more-or-less the same as the Gnu C
|
||||
'extern inline'. */
|
||||
function body *must* be emitted. Likewise, a function declared
|
||||
without either 'extern' or 'static' defaults to extern linkage
|
||||
(C99 6.2.2p5), and the compiler may choose whether to use the
|
||||
inline version or call the extern linkage version (6.7.4p6).
|
||||
If we are using GCC, but do not have the new behaviour, we need
|
||||
to use extern inline; if we are using a new GCC with the
|
||||
C99-compatible behaviour, or a non-GCC compiler (which we will
|
||||
have to hope is C99, since there is no other way to achieve the
|
||||
effect of omitting the function if it isn't referenced) we use
|
||||
'static inline', which c99 defines to mean more-or-less the same
|
||||
as the Gnu C 'extern inline'. */
|
||||
#if defined(__GNUC__) && !defined(__GNUC_STDC_INLINE__)
|
||||
/* We're using GCC, but without the new C99-compatible behaviour. */
|
||||
#define _ELIDABLE_INLINE extern __inline__ _ATTRIBUTE ((__always_inline__))
|
||||
#else
|
||||
/* We're using GCC in C99 mode, or an unknown compiler which
|
||||
we just have to hope obeys the C99 semantics of inline. */
|
||||
#define _ELIDABLE_INLINE __inline__
|
||||
#define _ELIDABLE_INLINE static __inline__
|
||||
#endif
|
||||
|
||||
#if __GNUC_PREREQ (3, 1)
|
||||
#define _NOINLINE __attribute__ ((__noinline__))
|
||||
#define _NOINLINE_STATIC _NOINLINE static
|
||||
#else
|
||||
/* On non-GNU compilers and GCC prior to version 3.1 the compiler can't be
|
||||
trusted not to inline if it is static. */
|
||||
#define _NOINLINE
|
||||
#define _NOINLINE_STATIC
|
||||
#endif
|
||||
|
||||
#endif /* _ANSIDECL_H_ */
|
||||
|
Reference in New Issue
Block a user