8baf84472ce77a6eee669ed5152decae7c229226
[openwrt/staging/wigyori.git] / toolchain / gcc / patches / 5.3.0 / 050-gcc-6-compile.patch
1 Upstream commit r233720
2
3 diff --git a/gcc/cp/cfns.gperf b/gcc/cp/cfns.gperf
4 index 68acd3d..214ecf6 100644
5 --- a/gcc/cp/cfns.gperf
6 +++ b/gcc/cp/cfns.gperf
7 @@ -1,3 +1,5 @@
8 +%language=C++
9 +%define class-name libc_name
10 %{
11 /* Copyright (C) 2000-2015 Free Software Foundation, Inc.
12
13 @@ -16,14 +18,6 @@ for more details.
14 You should have received a copy of the GNU General Public License
15 along with GCC; see the file COPYING3. If not see
16 <http://www.gnu.org/licenses/>. */
17 -#ifdef __GNUC__
18 -__inline
19 -#endif
20 -static unsigned int hash (const char *, unsigned int);
21 -#ifdef __GNUC__
22 -__inline
23 -#endif
24 -const char * libc_name_p (const char *, unsigned int);
25 %}
26 %%
27 # The standard C library functions, for feeding to gperf; the result is used
28 diff --git a/gcc/cp/cfns.h b/gcc/cp/cfns.h
29 index 1c6665d..596f413 100644
30 --- a/gcc/cp/cfns.h
31 +++ b/gcc/cp/cfns.h
32 @@ -1,5 +1,5 @@
33 -/* ANSI-C code produced by gperf version 3.0.3 */
34 -/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L ANSI-C cfns.gperf */
35 +/* C++ code produced by gperf version 3.0.4 */
36 +/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L C++ --output-file cfns.h cfns.gperf */
37
38 #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
39 && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
40 @@ -28,7 +28,7 @@
41 #error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
42 #endif
43
44 -#line 1 "cfns.gperf"
45 +#line 3 "cfns.gperf"
46
47 /* Copyright (C) 2000-2015 Free Software Foundation, Inc.
48
49 @@ -47,25 +47,18 @@ for more details.
50 You should have received a copy of the GNU General Public License
51 along with GCC; see the file COPYING3. If not see
52 <http://www.gnu.org/licenses/>. */
53 -#ifdef __GNUC__
54 -__inline
55 -#endif
56 -static unsigned int hash (const char *, unsigned int);
57 -#ifdef __GNUC__
58 -__inline
59 -#endif
60 -const char * libc_name_p (const char *, unsigned int);
61 /* maximum key range = 391, duplicates = 0 */
62
63 -#ifdef __GNUC__
64 -__inline
65 -#else
66 -#ifdef __cplusplus
67 -inline
68 -#endif
69 -#endif
70 -static unsigned int
71 -hash (register const char *str, register unsigned int len)
72 +class libc_name
73 +{
74 +private:
75 + static inline unsigned int hash (const char *str, unsigned int len);
76 +public:
77 + static const char *libc_name_p (const char *str, unsigned int len);
78 +};
79 +
80 +inline unsigned int
81 +libc_name::hash (register const char *str, register unsigned int len)
82 {
83 static const unsigned short asso_values[] =
84 {
85 @@ -122,14 +115,8 @@ hash (register const char *str, register unsigned int len)
86 return hval + asso_values[(unsigned char)str[len - 1]];
87 }
88
89 -#ifdef __GNUC__
90 -__inline
91 -#ifdef __GNUC_STDC_INLINE__
92 -__attribute__ ((__gnu_inline__))
93 -#endif
94 -#endif
95 const char *
96 -libc_name_p (register const char *str, register unsigned int len)
97 +libc_name::libc_name_p (register const char *str, register unsigned int len)
98 {
99 enum
100 {
101 diff --git a/gcc/cp/except.c b/gcc/cp/except.c
102 index 3ff1ce6..2f2e396 100644
103 --- a/gcc/cp/except.c
104 +++ b/gcc/cp/except.c
105 @@ -1040,7 +1040,8 @@ nothrow_libfn_p (const_tree fn)
106 unless the system headers are playing rename tricks, and if
107 they are, we don't want to be confused by them. */
108 id = DECL_NAME (fn);
109 - return !!libc_name_p (IDENTIFIER_POINTER (id), IDENTIFIER_LENGTH (id));
110 + return !!libc_name::libc_name_p (IDENTIFIER_POINTER (id),
111 + IDENTIFIER_LENGTH (id));
112 }
113
114 /* Returns nonzero if an exception of type FROM will be caught by a
115 --
116 1.7.1
117