]> git.pld-linux.org Git - packages/gccxml.git/blob - gccxml-gcc.patch
- added naive gcc 5.1/5.2 support (treat as 4.9); release .3
[packages/gccxml.git] / gccxml-gcc.patch
1 --- gccxml-3afa8ba5be6866e603dcabe80aff79856b558e24/GCC/gcc/toplev.c.orig       2015-04-23 20:34:31.000000000 +0200
2 +++ gccxml-3afa8ba5be6866e603dcabe80aff79856b558e24/GCC/gcc/toplev.c    2015-10-24 09:12:05.031923748 +0200
3 @@ -537,7 +537,7 @@
4     for floor_log2 and exact_log2; see toplev.h.  That construct, however,
5     conflicts with the ISO C++ One Definition Rule.   */
6  
7 -#if GCC_VERSION < 3004 || !defined (__cplusplus)
8 +#if GCC_VERSION < 3004
9  
10  /* Given X, an unsigned number, return the largest int Y such that 2**Y <= X.
11     If X is 0, return -1.  */
12 --- gccxml-3afa8ba5be6866e603dcabe80aff79856b558e24/GCC/gcc/toplev.h.orig       2015-04-23 20:34:31.000000000 +0200
13 +++ gccxml-3afa8ba5be6866e603dcabe80aff79856b558e24/GCC/gcc/toplev.h    2015-10-24 09:05:58.959568201 +0200
14 @@ -151,6 +151,7 @@
15  /* Return true iff flags are set as if -ffast-math.  */
16  extern bool fast_math_flags_set_p      (void);
17  
18 +#if GCC_VERSION < 3004
19  /* Return log2, or -1 if not exact.  */
20  extern int exact_log2                  (unsigned HOST_WIDE_INT);
21  
22 @@ -158,7 +159,7 @@
23  extern int floor_log2                  (unsigned HOST_WIDE_INT);
24  
25  /* Inline versions of the above for speed.  */
26 -#if GCC_VERSION >= 3004
27 +#else /* GCC_VERSION >= 3004 */
28  # if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONG
29  #  define CLZ_HWI __builtin_clzl
30  #  define CTZ_HWI __builtin_ctzl
31 @@ -170,13 +171,13 @@
32  #  define CTZ_HWI __builtin_ctz
33  # endif
34  
35 -extern inline int
36 +static inline int
37  floor_log2 (unsigned HOST_WIDE_INT x)
38  {
39    return x ? HOST_BITS_PER_WIDE_INT - 1 - (int) CLZ_HWI (x) : -1;
40  }
41  
42 -extern inline int
43 +static inline int
44  exact_log2 (unsigned HOST_WIDE_INT x)
45  {
46    return x == (x & -x) && x ? (int) CTZ_HWI (x) : -1;
This page took 0.026296 seconds and 3 git commands to generate.