From: DJ Delorie Date: Tue, 6 Mar 2007 19:00:57 +0000 (+0000) Subject: merge from gcc X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e04d761119b44cc3ddcedd1ae2356aa55a370eb0;p=binutils-gdb.git merge from gcc --- diff --git a/include/ChangeLog b/include/ChangeLog index e5b7dba3245..75c4753b77d 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,7 @@ +2007-03-06 Jan Hubicka + + * ansidecl.h (ATTRIBUTE_COLD, ATTRIBUTE_HOT): New. + 2007-02-21 Nick Clifton * bfdlink.h (struct bfd_link_callbacks): Add diff --git a/include/ansidecl.h b/include/ansidecl.h index 16adc47a1bf..c19955a98a6 100644 --- a/include/ansidecl.h +++ b/include/ansidecl.h @@ -367,6 +367,22 @@ So instead we use the macro below and test it against specific values. */ # define ATTRIBUTE_PACKED __attribute__ ((packed)) #endif +/* Attribute `hot' and `cold' was valid as of gcc 4.3. */ +#ifndef ATTRIBUTE_COLD +# if (GCC_VERSION >= 4003) +# define ATTRIBUTE_COLD __attribute__ ((__cold__)) +# else +# define ATTRIBUTE_COLD +# endif /* GNUC >= 4.3 */ +#endif /* ATTRIBUTE_COLD */ +#ifndef ATTRIBUTE_HOT +# if (GCC_VERSION >= 4003) +# define ATTRIBUTE_HOT __attribute__ ((__hot__)) +# else +# define ATTRIBUTE_HOT +# endif /* GNUC >= 4.3 */ +#endif /* ATTRIBUTE_HOT */ + /* We use __extension__ in some places to suppress -pedantic warnings about GCC extensions. This feature didn't work properly before gcc 2.8. */