1 2016-02-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
\r
3 Backported from mainline
\r
4 2016-02-19 Jakub Jelinek <jakub@redhat.com>
\r
5 Bernd Edlinger <bernd.edlinger@hotmail.de>
\r
7 * Make-lang.in: Invoke gperf with -L C++.
\r
8 * cfns.gperf: Remove prototypes for hash and libc_name_p
\r
10 * cfns.h: Regenerated.
\r
11 * except.c (nothrow_libfn_p): Adjust.
\r
13 Index: gcc/cp/Make-lang.in
\r
14 ===================================================================
\r
15 --- gcc/cp/Make-lang.in (revision 233574)
\r
16 +++ gcc/cp/Make-lang.in (working copy)
\r
17 @@ -111,7 +111,7 @@ else
\r
18 # deleting the $(srcdir)/cp/cfns.h file.
\r
19 $(srcdir)/cp/cfns.h:
\r
21 - gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L ANSI-C \
\r
22 + gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L C++ \
\r
23 $(srcdir)/cp/cfns.gperf --output-file $(srcdir)/cp/cfns.h
\r
26 Index: gcc/cp/cfns.gperf
\r
27 ===================================================================
\r
28 --- gcc/cp/cfns.gperf (revision 233574)
\r
29 +++ gcc/cp/cfns.gperf (working copy)
\r
32 +%define class-name libc_name
\r
34 /* Copyright (C) 2000-2015 Free Software Foundation, Inc.
\r
36 @@ -16,14 +18,6 @@ for more details.
\r
37 You should have received a copy of the GNU General Public License
\r
38 along with GCC; see the file COPYING3. If not see
\r
39 <http://www.gnu.org/licenses/>. */
\r
43 -static unsigned int hash (const char *, unsigned int);
\r
47 -const char * libc_name_p (const char *, unsigned int);
\r
50 # The standard C library functions, for feeding to gperf; the result is used
\r
51 Index: gcc/cp/cfns.h
\r
52 ===================================================================
\r
53 --- gcc/cp/cfns.h (revision 233574)
\r
54 +++ gcc/cp/cfns.h (working copy)
\r
56 -/* ANSI-C code produced by gperf version 3.0.3 */
\r
57 -/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L ANSI-C cfns.gperf */
\r
58 +/* C++ code produced by gperf version 3.0.4 */
\r
59 +/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L C++ --output-file cfns.h cfns.gperf */
\r
61 #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
\r
62 && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
\r
64 #error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
\r
67 -#line 1 "cfns.gperf"
\r
68 +#line 3 "cfns.gperf"
\r
70 /* Copyright (C) 2000-2015 Free Software Foundation, Inc.
\r
72 @@ -47,26 +47,19 @@ for more details.
\r
73 You should have received a copy of the GNU General Public License
\r
74 along with GCC; see the file COPYING3. If not see
\r
75 <http://www.gnu.org/licenses/>. */
\r
79 -static unsigned int hash (const char *, unsigned int);
\r
83 -const char * libc_name_p (const char *, unsigned int);
\r
84 /* maximum key range = 391, duplicates = 0 */
\r
93 -static unsigned int
\r
94 -hash (register const char *str, register unsigned int len)
\r
98 + static inline unsigned int hash (const char *str, unsigned int len);
\r
100 + static const char *libc_name_p (const char *str, unsigned int len);
\r
103 +inline unsigned int
\r
104 +libc_name::hash (register const char *str, register unsigned int len)
\r
106 static const unsigned short asso_values[] =
\r
108 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
\r
109 @@ -122,14 +115,8 @@ along with GCC; see the file COPYING3. If not see
\r
110 return hval + asso_values[(unsigned char)str[len - 1]];
\r
115 -#ifdef __GNUC_STDC_INLINE__
\r
116 -__attribute__ ((__gnu_inline__))
\r
120 -libc_name_p (register const char *str, register unsigned int len)
\r
121 +libc_name::libc_name_p (register const char *str, register unsigned int len)
\r
125 Index: gcc/cp/except.c
\r
126 ===================================================================
\r
127 --- gcc/cp/except.c (revision 233574)
\r
128 +++ gcc/cp/except.c (working copy)
\r
129 @@ -1040,7 +1040,8 @@ nothrow_libfn_p (const_tree fn)
\r
130 unless the system headers are playing rename tricks, and if
\r
131 they are, we don't want to be confused by them. */
\r
132 id = DECL_NAME (fn);
\r
133 - return !!libc_name_p (IDENTIFIER_POINTER (id), IDENTIFIER_LENGTH (id));
\r
134 + return !!libc_name::libc_name_p (IDENTIFIER_POINTER (id),
\r
135 + IDENTIFIER_LENGTH (id));
\r
138 /* Returns nonzero if an exception of type FROM will be caught by a
\r