Notice: We have migrated to GitLab launching 2024-05-01 see here: https://gitlab.rtems.org/

Ticket #2724: gcc-g++-4.4.7-rtems4.10-20160413.diff

File gcc-g++-4.4.7-rtems4.10-20160413.diff, 18.8 KB (added by Worth Burruss, on 05/31/16 at 14:24:09)
  • gcc/cp/cfns.gperf

    diff -Naur gcc-4.4.7-original/gcc/cp/cfns.gperf gcc-4.4.7/gcc/cp/cfns.gperf
    old new  
    55static unsigned int hash (const char *, unsigned int);
    66#ifdef __GNUC__
    77__inline
     8#ifdef __GNUC_STDC_INLINE__
     9__attribute__ ((__gnu_inline__))
     10#endif
    811#endif
    912const char * libc_name_p (const char *, unsigned int);
    1013%}
  • gcc/cp/cfns.gperf.orig

    diff -Naur gcc-4.4.7-original/gcc/cp/cfns.gperf.orig gcc-4.4.7/gcc/cp/cfns.gperf.orig
    old new  
     1%{
     2#ifdef __GNUC__
     3__inline
     4#endif
     5static unsigned int hash (const char *, unsigned int);
     6#ifdef __GNUC__
     7__inline
     8#endif
     9const char * libc_name_p (const char *, unsigned int);
     10%}
     11%%
     12# The standard C library functions, for feeding to gperf; the result is used
     13# by nothrow_libfn_p.
     14#
     15#   [lib.res.on.exception.handling]: None of the functions from the
     16#   Standard C library shall report an error by throwing an
     17#   exception, unless it calls a program-supplied function that
     18#   throws an exception.
     19#
     20# Specific functions are commented out for the reason noted in each case.
     21#
     22# abort                 -- synchronous exception from SIGABRT handler
     23abs
     24acos
     25asctime
     26asin
     27atan
     28atan2
     29atexit
     30atof
     31atoi
     32atol
     33#bsearch                -- calls user function which may throw exception
     34btowc
     35calloc
     36ceil
     37clearerr
     38clock
     39cos
     40cosh
     41ctime
     42difftime
     43div
     44exit
     45exp
     46fabs
     47#fclose                 -- POSIX thread cancellation point
     48feof
     49ferror
     50#fflush                 -- POSIX thread cancellation point
     51#fgetc                  -- POSIX thread cancellation point
     52#fgetpos                -- POSIX thread cancellation point
     53#fgets                  -- POSIX thread cancellation point
     54#fgetwc                 -- POSIX thread cancellation point
     55#fgetws                 -- POSIX thread cancellation point
     56floor
     57fmod
     58#fopen                  -- POSIX thread cancellation point
     59#fprintf                -- POSIX thread cancellation point
     60#fputc                  -- POSIX thread cancellation point
     61#fputs                  -- POSIX thread cancellation point
     62#fputwc                 -- POSIX thread cancellation point
     63#fputws                 -- POSIX thread cancellation point
     64#fread                  -- POSIX thread cancellation point
     65free
     66#freopen                -- POSIX thread cancellation point
     67frexp
     68#fscanf                 -- POSIX thread cancellation point
     69fseek
     70#fsetpos                -- POSIX thread cancellation point
     71#ftell                  -- POSIX thread cancellation point
     72fwide
     73#fwprintf               -- POSIX thread cancellation point
     74#fwrite                 -- POSIX thread cancellation point
     75#fwscanf                -- POSIX thread cancellation point
     76#getc                   -- POSIX thread cancellation point
     77#getchar                -- POSIX thread cancellation point
     78getenv
     79#gets                   -- POSIX thread cancellation point
     80#getwc                  -- POSIX thread cancellation point
     81#getwchar               -- POSIX thread cancellation point
     82gmtime
     83isalnum
     84isalpha
     85iscntrl
     86isdigit
     87isgraph
     88islower
     89isprint
     90ispunct
     91isspace
     92isupper
     93iswalnum
     94iswalpha
     95iswcntrl
     96iswctype
     97iswdigit
     98iswgraph
     99iswlower
     100iswprint
     101iswpunct
     102iswspace
     103iswupper
     104iswxdigit
     105isxdigit
     106labs
     107ldexp
     108ldiv
     109localeconv
     110localtime
     111log
     112log10
     113longjmp
     114malloc
     115mblen
     116mbrlen
     117mbrtowc
     118mbsinit
     119mbsrtowcs
     120mbstowcs
     121mbtowc
     122memchr
     123memcmp
     124memcpy
     125memmove
     126memset
     127mktime
     128modf
     129#perror                 -- POSIX thread cancellation point
     130pow
     131#printf                 -- POSIX thread cancellation point
     132#putc                   -- POSIX thread cancellation point
     133#putchar                -- POSIX thread cancellation point
     134#puts                   -- POSIX thread cancellation point
     135#putwc                  -- POSIX thread cancellation point
     136#putwchar               -- POSIX thread cancellation point
     137#qsort                  -- calls user function which may throw exception
     138#raise                  -- synchronous exception from signal handler
     139rand
     140realloc
     141#remove                 -- POSIX thread cancellation point
     142#rename                 -- POSIX thread cancellation point
     143#rewind                 -- POSIX thread cancellation point
     144#scanf                  -- POSIX thread cancellation point
     145setbuf
     146setlocale
     147setvbuf
     148signal
     149sin
     150sinh
     151sprintf
     152sqrt
     153srand
     154sscanf
     155strcat
     156strchr
     157strcmp
     158strcoll
     159strcpy
     160strcspn
     161#strerror               -- POSIX thread cancellation point
     162strftime
     163strlen
     164strncat
     165strncmp
     166strncpy
     167strpbrk
     168strrchr
     169strspn
     170strstr
     171strtod
     172strtok
     173strtol
     174strtoul
     175strxfrm
     176swprintf
     177swscanf
     178#system                 -- POSIX thread cancellation point
     179tan
     180tanh
     181time
     182#tmpfile                -- POSIX thread cancellation point
     183#tmpnam                 -- POSIX thread cancellation point
     184tolower
     185toupper
     186towctrans
     187towlower
     188towupper
     189#ungetc                 -- POSIX thread cancellation point
     190#ungetwc                -- POSIX thread cancellation point
     191#vfprintf               -- POSIX thread cancellation point
     192#vfwprintf              -- POSIX thread cancellation point
     193#vprintf                -- POSIX thread cancellation point
     194vsprintf
     195vswprintf
     196#vwprintf               -- POSIX thread cancellation point
     197wcrtomb
     198wcscat
     199wcschr
     200wcscmp
     201wcscoll
     202wcscpy
     203wcscspn
     204wcsftime
     205wcslen
     206wcsncat
     207wcsncmp
     208wcsncpy
     209wcspbrk
     210wcsrchr
     211wcsrtombs
     212wcsspn
     213wcsstr
     214wcstod
     215wcstok
     216wcstol
     217wcstombs
     218wcstoul
     219wcsxfrm
     220wctob
     221wctomb
     222wctrans
     223wctype
     224wmemchr
     225wmemcmp
     226wmemcpy
     227wmemmove
     228wmemset
     229#wprintf                -- POSIX thread cancellation point
     230#wscanf                 -- POSIX thread cancellation point
  • gcc/cp/cfns.h

    diff -Naur gcc-4.4.7-original/gcc/cp/cfns.h gcc-4.4.7/gcc/cp/cfns.h
    old new  
    3636static unsigned int hash (const char *, unsigned int);
    3737#ifdef __GNUC__
    3838__inline
     39#ifdef __GNUC_STDC_INLINE__
     40__attribute__ ((__gnu_inline__))
     41#endif
    3942#endif
    4043const char * libc_name_p (const char *, unsigned int);
    4144/* maximum key range = 391, duplicates = 0 */
  • gcc/cp/cfns.h.orig

    diff -Naur gcc-4.4.7-original/gcc/cp/cfns.h.orig gcc-4.4.7/gcc/cp/cfns.h.orig
    old new  
     1/* ANSI-C code produced by gperf version 3.0.3 */
     2/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L ANSI-C cfns.gperf  */
     3
     4#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
     5      && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
     6      && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \
     7      && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \
     8      && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \
     9      && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \
     10      && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \
     11      && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \
     12      && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \
     13      && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \
     14      && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \
     15      && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \
     16      && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \
     17      && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \
     18      && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \
     19      && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \
     20      && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \
     21      && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \
     22      && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \
     23      && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \
     24      && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \
     25      && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \
     26      && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126))
     27/* The character set is not based on ISO-646.  */
     28#error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
     29#endif
     30
     31#line 1 "../../gcc/cp/cfns.gperf"
     32
     33#ifdef __GNUC__
     34__inline
     35#endif
     36static unsigned int hash (const char *, unsigned int);
     37#ifdef __GNUC__
     38__inline
     39#endif
     40const char * libc_name_p (const char *, unsigned int);
     41/* maximum key range = 391, duplicates = 0 */
     42
     43#ifdef __GNUC__
     44__inline
     45#else
     46#ifdef __cplusplus
     47inline
     48#endif
     49#endif
     50static unsigned int
     51hash (register const char *str, register unsigned int len)
     52{
     53  static const unsigned short asso_values[] =
     54    {
     55      400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
     56      400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
     57      400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
     58      400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
     59      400, 400, 400, 400, 400, 400, 400, 400,   0,   0,
     60        1, 400, 400, 400, 400, 400, 400, 400, 400, 400,
     61      400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
     62      400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
     63      400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
     64      400, 400, 400, 400, 400, 400, 400,  28,  90,   0,
     65       95,   0,  51,  93, 114,  26, 109, 124,   5,   1,
     66        6,  13,  37, 128,   3,   0,   0,  49,  38,   0,
     67      104,  45,   0, 400, 400, 400, 400, 400, 400, 400,
     68      400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
     69      400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
     70      400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
     71      400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
     72      400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
     73      400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
     74      400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
     75      400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
     76      400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
     77      400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
     78      400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
     79      400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
     80      400, 400, 400, 400, 400, 400, 400
     81    };
     82  register int hval = len;
     83
     84  switch (hval)
     85    {
     86      default:
     87        hval += asso_values[(unsigned char)str[5]+1];
     88      /*FALLTHROUGH*/
     89      case 5:
     90        hval += asso_values[(unsigned char)str[4]];
     91      /*FALLTHROUGH*/
     92      case 4:
     93        hval += asso_values[(unsigned char)str[3]];
     94      /*FALLTHROUGH*/
     95      case 3:
     96        hval += asso_values[(unsigned char)str[2]];
     97      /*FALLTHROUGH*/
     98      case 2:
     99        hval += asso_values[(unsigned char)str[1]];
     100      /*FALLTHROUGH*/
     101      case 1:
     102        hval += asso_values[(unsigned char)str[0]];
     103        break;
     104    }
     105  return hval + asso_values[(unsigned char)str[len - 1]];
     106}
     107
     108#ifdef __GNUC__
     109__inline
     110#ifdef __GNUC_STDC_INLINE__
     111__attribute__ ((__gnu_inline__))
     112#endif
     113#endif
     114const char *
     115libc_name_p (register const char *str, register unsigned int len)
     116{
     117  enum
     118    {
     119      TOTAL_KEYWORDS = 156,
     120      MIN_WORD_LENGTH = 3,
     121      MAX_WORD_LENGTH = 10,
     122      MIN_HASH_VALUE = 9,
     123      MAX_HASH_VALUE = 399
     124    };
     125
     126  static const char * const wordlist[] =
     127    {
     128      "wcsstr",
     129      "strstr",
     130      "cos",
     131      "towctrans",
     132      "memmove",
     133      "wcstol",
     134      "wcscoll",
     135      "wcstombs",
     136      "strtol",
     137      "strcoll",
     138      "wcslen",
     139      "time",
     140      "ctime",
     141      "strlen",
     142      "iswctype",
     143      "wmemchr",
     144      "wcsrchr",
     145      "ceil",
     146      "sin",
     147      "strrchr",
     148      "tan",
     149      "iscntrl",
     150      "acos",
     151      "wmemmove",
     152      "wcsrtombs",
     153      "wctrans",
     154      "wmemcmp",
     155      "pow",
     156      "atol",
     157      "wcsncmp",
     158      "memset",
     159      "free",
     160      "strncmp",
     161      "wmemset",
     162      "wcsspn",
     163      "wcstoul",
     164      "strspn",
     165      "strtoul",
     166      "asctime",
     167      "atan2",
     168      "asin",
     169      "atan",
     170      "ferror",
     171      "iswalnum",
     172      "wcscat",
     173      "realloc",
     174      "strcat",
     175      "wcscpy",
     176      "memcpy",
     177      "strcpy",
     178      "tolower",
     179      "floor",
     180      "iswcntrl",
     181      "atoi",
     182      "clearerr",
     183      "swscanf",
     184      "wcsncat",
     185      "islower",
     186      "strncat",
     187      "btowc",
     188      "localtime",
     189      "wctomb",
     190      "isalnum",
     191      "isprint",
     192      "mblen",
     193      "wcstod",
     194      "log10",
     195      "strtod",
     196      "wcrtomb",
     197      "abs",
     198      "setlocale",
     199      "wcschr",
     200      "mbrlen",
     201      "memchr",
     202      "strchr",
     203      "labs",
     204      "iswpunct",
     205      "exit",
     206      "sqrt",
     207      "swprintf",
     208      "wctype",
     209      "mbsrtowcs",
     210      "wcscspn",
     211      "getenv",
     212      "strcspn",
     213      "towlower",
     214      "atof",
     215      "wcstok",
     216      "localeconv",
     217      "strtok",
     218      "calloc",
     219      "malloc",
     220      "isalpha",
     221      "iswlower",
     222      "iswspace",
     223      "wcsxfrm",
     224      "signal",
     225      "strxfrm",
     226      "wcsftime",
     227      "feof",
     228      "strftime",
     229      "wcscmp",
     230      "fabs",
     231      "memcmp",
     232      "strcmp",
     233      "vsprintf",
     234      "fwide",
     235      "gmtime",
     236      "sprintf",
     237      "exp",
     238      "wmemcpy",
     239      "iswprint",
     240      "sscanf",
     241      "wcsncpy",
     242      "strncpy",
     243      "isspace",
     244      "toupper",
     245      "wctob",
     246      "div",
     247      "mbtowc",
     248      "ldiv",
     249      "log",
     250      "mktime",
     251      "isupper",
     252      "atexit",
     253      "modf",
     254      "mbstowcs",
     255      "mbrtowc",
     256      "ispunct",
     257      "iswalpha",
     258      "setvbuf",
     259      "rand",
     260      "srand",
     261      "frexp",
     262      "towupper",
     263      "mbsinit",
     264      "cosh",
     265      "vswprintf",
     266      "iswupper",
     267      "wcspbrk",
     268      "fmod",
     269      "strpbrk",
     270      "sinh",
     271      "tanh",
     272      "iswdigit",
     273      "clock",
     274      "longjmp",
     275      "ldexp",
     276      "setbuf",
     277      "fseek",
     278      "iswgraph",
     279      "difftime",
     280      "iswxdigit",
     281      "isdigit",
     282      "isxdigit",
     283      "isgraph"
     284    };
     285
     286  static const short lookup[] =
     287    {
     288       -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,
     289       -1,  -1,   1,  -1,  -1,  -1,   2,  -1,  -1,  -1,
     290       -1,  -1,   3,   4,  -1,   5,   6,   7,   8,   9,
     291       10,  11,  12,  13,  14,  -1,  -1,  -1,  15,  16,
     292       17,  18,  19,  20,  21,  22,  -1,  -1,  23,  24,
     293       -1,  25,  26,  27,  -1,  28,  29,  30,  31,  32,
     294       33,  -1,  34,  35,  -1,  36,  37,  38,  -1,  39,
     295       40,  -1,  41,  -1,  -1,  -1,  -1,  -1,  -1,  42,
     296       -1,  43,  -1,  44,  -1,  45,  46,  -1,  47,  -1,
     297       48,  49,  50,  51,  52,  -1,  -1,  53,  54,  55,
     298       -1,  -1,  -1,  56,  -1,  57,  58,  -1,  59,  60,
     299       61,  62,  63,  64,  65,  -1,  66,  67,  -1,  68,
     300       -1,  69,  70,  71,  72,  73,  74,  75,  -1,  -1,
     301       -1,  -1,  -1,  76,  77,  78,  -1,  -1,  79,  80,
     302       81,  82,  -1,  83,  84,  -1,  85,  86,  87,  -1,
     303       88,  89,  90,  91,  -1,  -1,  -1,  92,  -1,  93,
     304       -1,  94,  -1,  95,  -1,  96,  97,  -1,  98,  -1,
     305       99, 100, 101, 102, 103, 104, 105, 106, 107, 108,
     306       -1, 109, 110, 111, 112,  -1, 113,  -1,  -1, 114,
     307       -1,  -1,  -1, 115,  -1,  -1,  -1, 116, 117,  -1,
     308      118,  -1,  -1,  -1,  -1, 119, 120, 121,  -1, 122,
     309      123,  -1,  -1, 124,  -1, 125, 126,  -1, 127,  -1,
     310      128,  -1,  -1, 129, 130,  -1,  -1,  -1,  -1,  -1,
     311       -1, 131, 132,  -1,  -1,  -1,  -1, 133, 134, 135,
     312       -1,  -1,  -1,  -1,  -1, 136,  -1, 137,  -1,  -1,
     313       -1, 138,  -1,  -1,  -1,  -1,  -1,  -1, 139, 140,
     314       -1, 141,  -1,  -1, 142,  -1, 143,  -1,  -1, 144,
     315       -1, 145,  -1,  -1,  -1,  -1, 146,  -1,  -1,  -1,
     316       -1,  -1,  -1, 147,  -1,  -1,  -1,  -1,  -1, 148,
     317       -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
     318       -1,  -1,  -1,  -1, 149,  -1,  -1,  -1,  -1,  -1,
     319       -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
     320       -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
     321       -1,  -1,  -1,  -1, 150,  -1,  -1,  -1,  -1,  -1,
     322      151,  -1,  -1, 152,  -1,  -1,  -1,  -1,  -1,  -1,
     323       -1,  -1,  -1,  -1,  -1,  -1, 153,  -1,  -1,  -1,
     324       -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
     325       -1,  -1,  -1, 154,  -1,  -1,  -1,  -1,  -1,  -1,
     326       -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
     327       -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1, 155
     328    };
     329
     330  if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
     331    {
     332      register int key = hash (str, len);
     333
     334      if (key <= MAX_HASH_VALUE && key >= 0)
     335        {
     336          register int index = lookup[key];
     337
     338          if (index >= 0)
     339            {
     340              register const char *s = wordlist[index];
     341
     342              if (*str == *s && !strcmp (str + 1, s + 1))
     343                return s;
     344            }
     345        }
     346    }
     347  return 0;
     348}
  • gcc/toplev.c

    diff -Naur gcc-4.4.7-original/gcc/toplev.c gcc-4.4.7/gcc/toplev.c
    old new  
    523523  return atoi (p);
    524524}
    525525
    526 /* When compiling with a recent enough GCC, we use the GNU C "extern inline"
    527    for floor_log2 and exact_log2; see toplev.h.  That construct, however,
    528    conflicts with the ISO C++ One Definition Rule.   */
    529 
    530 #if ((GCC_VERSION < 3004) || defined(__clang__)) || !defined (__cplusplus)
     526#if ((GCC_VERSION < 3004) || defined(__clang__))
     527/* The functions floor_log2 and exact_log2 are defined as inline
     528   functions in toplev.h if GCC_VERSION >= 3004.  The definitions here
     529   are used for older versions of gcc.  */
    531530
    532531/* Given X, an unsigned number, return the largest int Y such that 2**Y <= X.
    533532   If X is 0, return -1.  */
     
    540539  if (x == 0)
    541540    return -1;
    542541
    543 #ifdef CLZ_HWI
    544   t = HOST_BITS_PER_WIDE_INT - 1 - (int) CLZ_HWI (x);
    545 #else
    546542  if (HOST_BITS_PER_WIDE_INT > 64)
    547543    if (x >= (unsigned HOST_WIDE_INT) 1 << (t + 64))
    548544      t += 64;
     
    559555    t += 2;
    560556  if (x >= ((unsigned HOST_WIDE_INT) 1) << (t + 1))
    561557    t += 1;
    562 #endif
    563558
    564559  return t;
    565560}
     
    572567{
    573568  if (x != (x & -x))
    574569    return -1;
    575 #ifdef CTZ_HWI
    576   return x ? CTZ_HWI (x) : -1;
    577 #else
    578570  return floor_log2 (x);
    579 #endif
    580571}
    581572
    582 #endif /*  GCC_VERSION < 3004 || !defined (__cplusplus) */
     573#endif /* GCC_VERSION < 3004 */
    583574
    584575/* Handler for fatal signals, such as SIGSEGV.  These are transformed
    585576   into ICE messages, which is much more user friendly.  In case the
  • gcc/toplev.h

    diff -Naur gcc-4.4.7-original/gcc/toplev.h gcc-4.4.7/gcc/toplev.h
    old new  
    167167extern bool fast_math_flags_set_p       (void);
    168168extern bool fast_math_flags_struct_set_p (struct cl_optimization *);
    169169
     170/* Inline versions of the above for speed.  */
     171#if GCC_VERSION < 3004
     172
    170173/* Return log2, or -1 if not exact.  */
    171174extern int exact_log2                  (unsigned HOST_WIDE_INT);
    172175
     
    174177extern int floor_log2                  (unsigned HOST_WIDE_INT);
    175178
    176179/* Inline versions of the above for speed.  */
    177 #if (GCC_VERSION >= 3004) && !defined(__clang__)
     180#else /* GCC_VERSION >= 3004 */
     181
    178182# if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONG
    179183#  define CLZ_HWI __builtin_clzl
    180184#  define CTZ_HWI __builtin_ctzl
     
    186190#  define CTZ_HWI __builtin_ctz
    187191# endif
    188192
    189 extern inline int
     193static inline int
    190194floor_log2 (unsigned HOST_WIDE_INT x)
    191195{
    192196  return x ? HOST_BITS_PER_WIDE_INT - 1 - (int) CLZ_HWI (x) : -1;
    193197}
    194198
    195 extern inline int
     199static inline int
    196200exact_log2 (unsigned HOST_WIDE_INT x)
    197201{
    198202  return x == (x & -x) && x ? (int) CTZ_HWI (x) : -1;
    199203}
     204
    200205#endif /* GCC_VERSION >= 3004 */
    201206
    202207/* Functions used to get and set GCC's notion of in what directory