board/csky: fixup gdb instructions in readme.txt
[buildroot-gz.git] / package / gcc / 4.8.5 / 130-fix_build_with_gcc-6.patch
blob62ac3cbd653a74fa7a160d00220ec7a1e8671f03
1 From 1e5f1089dec3af328fd03125d6778f666d0bd4e4 Mon Sep 17 00:00:00 2001
2 From: edlinger <edlinger@138bc75d-0d04-0410-961f-82ee72b054a4>
3 Date: Thu, 25 Feb 2016 15:33:50 +0000
4 Subject: [PATCH 1/1] 2016-02-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
6 Backported from mainline
7 2016-02-19 Jakub Jelinek <jakub@redhat.com>
8 Bernd Edlinger <bernd.edlinger@hotmail.de>
10 * Make-lang.in: Invoke gperf with -L C++.
11 * cfns.gperf: Remove prototypes for hash and libc_name_p
12 inlines.
13 * cfns.h: Regenerated.
14 * except.c (nothrow_libfn_p): Adjust.
17 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-5-branch@233720 138bc75d-0d04-0410-961f-82ee72b054a4
19 Signed-off-by: Samuel Martin <s.martin49@gmail.com>
20 ---
21 gcc/cp/Make-lang.in | 2 +-
22 gcc/cp/cfns.gperf | 10 ++--------
23 gcc/cp/cfns.h | 41 ++++++++++++++---------------------------
24 gcc/cp/except.c | 3 ++-
25 5 files changed, 31 insertions(+), 37 deletions(-)
27 diff --git a/gcc/cp/Make-lang.in b/gcc/cp/Make-lang.in
28 index e98beb1..b09fb02 100644
29 --- a/gcc/cp/Make-lang.in
30 +++ b/gcc/cp/Make-lang.in
31 @@ -111,7 +111,7 @@ else
32 # deleting the $(srcdir)/cp/cfns.h file.
33 $(srcdir)/cp/cfns.h:
34 endif
35 - gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L ANSI-C \
36 + gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L C++ \
37 $(srcdir)/cp/cfns.gperf --output-file $(srcdir)/cp/cfns.h
39 #\f
40 diff --git a/gcc/cp/cfns.gperf b/gcc/cp/cfns.gperf
41 index 68acd3d..214ecf6 100644
42 --- a/gcc/cp/cfns.gperf
43 +++ b/gcc/cp/cfns.gperf
44 @@ -1,3 +1,5 @@
45 +%language=C++
46 +%define class-name libc_name
48 /* Copyright (C) 2000-2015 Free Software Foundation, Inc.
50 @@ -16,14 +18,6 @@ for more details.
51 You should have received a copy of the GNU General Public License
52 along with GCC; see the file COPYING3. If not see
53 <http://www.gnu.org/licenses/>. */
54 -#ifdef __GNUC__
55 -__inline
56 -#endif
57 -static unsigned int hash (const char *, unsigned int);
58 -#ifdef __GNUC__
59 -__inline
60 -#endif
61 -const char * libc_name_p (const char *, unsigned int);
64 # The standard C library functions, for feeding to gperf; the result is used
65 diff --git a/gcc/cp/cfns.h b/gcc/cp/cfns.h
66 index 1c6665d..596f413 100644
67 --- a/gcc/cp/cfns.h
68 +++ b/gcc/cp/cfns.h
69 @@ -1,5 +1,5 @@
70 -/* ANSI-C code produced by gperf version 3.0.3 */
71 -/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L ANSI-C cfns.gperf */
72 +/* C++ code produced by gperf version 3.0.4 */
73 +/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L C++ --output-file cfns.h cfns.gperf */
75 #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
76 && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
77 @@ -28,7 +28,7 @@
78 #error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
79 #endif
81 -#line 1 "cfns.gperf"
82 +#line 3 "cfns.gperf"
84 /* Copyright (C) 2000-2015 Free Software Foundation, Inc.
86 @@ -47,25 +47,18 @@ for more details.
87 You should have received a copy of the GNU General Public License
88 along with GCC; see the file COPYING3. If not see
89 <http://www.gnu.org/licenses/>. */
90 -#ifdef __GNUC__
91 -__inline
92 -#endif
93 -static unsigned int hash (const char *, unsigned int);
94 -#ifdef __GNUC__
95 -__inline
96 -#endif
97 -const char * libc_name_p (const char *, unsigned int);
98 /* maximum key range = 391, duplicates = 0 */
100 -#ifdef __GNUC__
101 -__inline
102 -#else
103 -#ifdef __cplusplus
104 -inline
105 -#endif
106 -#endif
107 -static unsigned int
108 -hash (register const char *str, register unsigned int len)
109 +class libc_name
111 +private:
112 + static inline unsigned int hash (const char *str, unsigned int len);
113 +public:
114 + static const char *libc_name_p (const char *str, unsigned int len);
117 +inline unsigned int
118 +libc_name::hash (register const char *str, register unsigned int len)
120 static const unsigned short asso_values[] =
122 @@ -122,14 +115,8 @@ hash (register const char *str, register unsigned int len)
123 return hval + asso_values[(unsigned char)str[len - 1]];
126 -#ifdef __GNUC__
127 -__inline
128 -#ifdef __GNUC_STDC_INLINE__
129 -__attribute__ ((__gnu_inline__))
130 -#endif
131 -#endif
132 const char *
133 -libc_name_p (register const char *str, register unsigned int len)
134 +libc_name::libc_name_p (register const char *str, register unsigned int len)
136 enum
138 diff --git a/gcc/cp/except.c b/gcc/cp/except.c
139 index 3ff1ce6..2f2e396 100644
140 --- a/gcc/cp/except.c
141 +++ b/gcc/cp/except.c
142 @@ -1040,7 +1040,8 @@ nothrow_libfn_p (const_tree fn)
143 unless the system headers are playing rename tricks, and if
144 they are, we don't want to be confused by them. */
145 id = DECL_NAME (fn);
146 - return !!libc_name_p (IDENTIFIER_POINTER (id), IDENTIFIER_LENGTH (id));
147 + return !!libc_name::libc_name_p (IDENTIFIER_POINTER (id),
148 + IDENTIFIER_LENGTH (id));
151 /* Returns nonzero if an exception of type FROM will be caught by a
153 1.7.1