Line
Link Here
|
0 |
-- a/gcc/cp/Make-lang.in |
0 |
++ b/gcc/cp/Make-lang.in |
Lines 111-117
else
Link Here
|
111 |
# deleting the $(srcdir)/cp/cfns.h file. |
111 |
# deleting the $(srcdir)/cp/cfns.h file. |
112 |
$(srcdir)/cp/cfns.h: |
112 |
$(srcdir)/cp/cfns.h: |
113 |
endif |
113 |
endif |
114 |
gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L ANSI-C \ |
114 |
gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L C++ \ |
115 |
$(srcdir)/cp/cfns.gperf --output-file $(srcdir)/cp/cfns.h |
115 |
$(srcdir)/cp/cfns.gperf --output-file $(srcdir)/cp/cfns.h |
116 |
|
116 |
|
117 |
# |
117 |
# |
118 |
-- a/gcc/cp/cfns.gperf |
118 |
++ b/gcc/cp/cfns.gperf |
Lines 1-3
Link Here
|
|
|
1 |
%language=C++ |
2 |
%define class-name libc_name |
1 |
%{ |
3 |
%{ |
2 |
/* Copyright (C) 2000-2015 Free Software Foundation, Inc. |
4 |
/* Copyright (C) 2000-2015 Free Software Foundation, Inc. |
3 |
|
5 |
|
Lines 16-29
for more details.
Link Here
|
16 |
You should have received a copy of the GNU General Public License |
18 |
You should have received a copy of the GNU General Public License |
17 |
along with GCC; see the file COPYING3. If not see |
19 |
along with GCC; see the file COPYING3. If not see |
18 |
<http://www.gnu.org/licenses/>. */ |
20 |
<http://www.gnu.org/licenses/>. */ |
19 |
#ifdef __GNUC__ |
|
|
20 |
__inline |
21 |
#endif |
22 |
static unsigned int hash (const char *, unsigned int); |
23 |
#ifdef __GNUC__ |
24 |
__inline |
25 |
#endif |
26 |
const char * libc_name_p (const char *, unsigned int); |
27 |
%} |
21 |
%} |
28 |
%% |
22 |
%% |
29 |
# The standard C library functions, for feeding to gperf; the result is used |
23 |
# The standard C library functions, for feeding to gperf; the result is used |
30 |
-- a/gcc/cp/cfns.h |
24 |
++ b/gcc/cp/cfns.h |
Lines 28-34
Link Here
|
28 |
#error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>." |
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 |
29 |
#endif |
30 |
|
30 |
|
31 |
#line 1 "cfns.gperf" |
31 |
#line 3 "cfns.gperf" |
32 |
|
32 |
|
33 |
/* Copyright (C) 2000-2015 Free Software Foundation, Inc. |
33 |
/* Copyright (C) 2000-2015 Free Software Foundation, Inc. |
34 |
|
34 |
|
Lines 47-71
for more details.
Link Here
|
47 |
You should have received a copy of the GNU General Public License |
47 |
You should have received a copy of the GNU General Public License |
48 |
along with GCC; see the file COPYING3. If not see |
48 |
along with GCC; see the file COPYING3. If not see |
49 |
<http://www.gnu.org/licenses/>. */ |
49 |
<http://www.gnu.org/licenses/>. */ |
50 |
#ifdef __GNUC__ |
|
|
51 |
__inline |
52 |
#endif |
53 |
static unsigned int hash (const char *, unsigned int); |
54 |
#ifdef __GNUC__ |
55 |
__inline |
56 |
#endif |
57 |
const char * libc_name_p (const char *, unsigned int); |
58 |
/* maximum key range = 391, duplicates = 0 */ |
50 |
/* maximum key range = 391, duplicates = 0 */ |
59 |
|
51 |
|
60 |
#ifdef __GNUC__ |
52 |
class libc_name |
61 |
__inline |
53 |
{ |
62 |
#else |
54 |
private: |
63 |
#ifdef __cplusplus |
55 |
static inline unsigned int hash (const char *str, unsigned int len); |
64 |
inline |
56 |
public: |
65 |
#endif |
57 |
static const char *libc_name_p (const char *str, unsigned int len); |
66 |
#endif |
58 |
}; |
67 |
static unsigned int |
59 |
|
68 |
hash (register const char *str, register unsigned int len) |
60 |
inline unsigned int |
|
|
61 |
libc_name::hash (register const char *str, register unsigned int len) |
69 |
{ |
62 |
{ |
70 |
static const unsigned short asso_values[] = |
63 |
static const unsigned short asso_values[] = |
71 |
{ |
64 |
{ |
Lines 122-135
hash (register const char *str, register
Link Here
|
122 |
return hval + asso_values[(unsigned char)str[len - 1]]; |
115 |
return hval + asso_values[(unsigned char)str[len - 1]]; |
123 |
} |
116 |
} |
124 |
|
117 |
|
125 |
#ifdef __GNUC__ |
|
|
126 |
__inline |
127 |
#ifdef __GNUC_STDC_INLINE__ |
128 |
__attribute__ ((__gnu_inline__)) |
129 |
#endif |
130 |
#endif |
131 |
const char * |
118 |
const char * |
132 |
libc_name_p (register const char *str, register unsigned int len) |
119 |
libc_name::libc_name_p (register const char *str, register unsigned int len) |
133 |
{ |
120 |
{ |
134 |
enum |
121 |
enum |
135 |
{ |
122 |
{ |
136 |
-- a/gcc/cp/except.c |
123 |
++ b/gcc/cp/except.c |
Lines 1040-1046
nothrow_libfn_p (const_tree fn)
Link Here
|
1040 |
unless the system headers are playing rename tricks, and if |
1040 |
unless the system headers are playing rename tricks, and if |
1041 |
they are, we don't want to be confused by them. */ |
1041 |
they are, we don't want to be confused by them. */ |
1042 |
id = DECL_NAME (fn); |
1042 |
id = DECL_NAME (fn); |
1043 |
return !!libc_name_p (IDENTIFIER_POINTER (id), IDENTIFIER_LENGTH (id)); |
1043 |
return !!libc_name::libc_name_p (IDENTIFIER_POINTER (id), |
|
|
1044 |
IDENTIFIER_LENGTH (id)); |
1044 |
} |
1045 |
} |
1045 |
|
1046 |
|
1046 |
/* Returns nonzero if an exception of type FROM will be caught by a |
1047 |
/* Returns nonzero if an exception of type FROM will be caught by a |