wok-next view gcc49/stuff/cfns.gperf.u @ rev 21727
created recipe for vbindiff
author | Hans-G?nter Theisgen |
---|---|
date | Sat Nov 21 14:32:44 2020 +0100 (2020-11-21) |
parents | |
children |
line source
1 From ec1cc0263f156f70693a62cf17b254a0029f4852 Mon Sep 17 00:00:00 2001
2 From: edlinger <edlinger@138bc75d-0d04-0410-961f-82ee72b054a4>
3 Date: Fri, 19 Feb 2016 22:13:29 +0000
4 Subject: [PATCH] 2016-02-19 Jakub Jelinek <jakub@redhat.com>
5 Bernd Edlinger <bernd.edlinger@hotmail.de>
7 * Make-lang.in: Invoke gperf with -L C++.
8 * cfns.gperf: Remove prototypes for hash and libc_name_p
9 inlines.
10 * cfns.h: Regenerated.
11 * except.c (nothrow_libfn_p): Adjust.
14 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233572 138bc75d-0d04-0410-961f-82ee72b054a4
15 ---
16 gcc/cp/ChangeLog | 9 +++++++++
17 gcc/cp/Make-lang.in | 2 +-
18 gcc/cp/cfns.gperf | 10 ++--------
19 gcc/cp/cfns.h | 41 ++++++++++++++---------------------------
20 gcc/cp/except.c | 3 ++-
21 5 files changed, 28 insertions(+), 37 deletions(-)
23 diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
24 index a80abb5..571c416 100644
25 --- a/gcc/cp/ChangeLog
26 +++ b/gcc/cp/ChangeLog
27 @@ -1,4 +1,13 @@
28 2016-02-19 Jakub Jelinek <jakub@redhat.com>
29 + Bernd Edlinger <bernd.edlinger@hotmail.de>
30 +
31 + * Make-lang.in: Invoke gperf with -L C++.
32 + * cfns.gperf: Remove prototypes for hash and libc_name_p
33 + inlines.
34 + * cfns.h: Regenerated.
35 + * except.c (nothrow_libfn_p): Adjust.
36 +
37 +2016-02-19 Jakub Jelinek <jakub@redhat.com>
39 PR c++/69850
40 * rtti.c (ifnonnull): Set TREE_NO_WARNING on the condition, use
41 diff --git a/gcc/cp/Make-lang.in b/gcc/cp/Make-lang.in
42 index 671ce12..2286c64 100644
43 --- a/gcc/cp/Make-lang.in
44 +++ b/gcc/cp/Make-lang.in
45 @@ -112,7 +112,7 @@ else
46 # deleting the $(srcdir)/cp/cfns.h file.
47 $(srcdir)/cp/cfns.h:
48 endif
49 - gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L ANSI-C \
50 + gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L C++ \
51 $(srcdir)/cp/cfns.gperf --output-file $(srcdir)/cp/cfns.h
53 #
54 diff --git a/gcc/cp/cfns.gperf b/gcc/cp/cfns.gperf
55 index 2784edc..8d7f015 100644
56 --- a/gcc/cp/cfns.gperf
57 +++ b/gcc/cp/cfns.gperf
58 @@ -1,3 +1,5 @@
59 +%language=C++
60 +%define class-name libc_name
61 %{
62 /* Copyright (C) 2000-2016 Free Software Foundation, Inc.
64 @@ -16,14 +18,6 @@ for more details.
65 You should have received a copy of the GNU General Public License
66 along with GCC; see the file COPYING3. If not see
67 <http://www.gnu.org/licenses/>. */
68 -#ifdef __GNUC__
69 -__inline
70 -#endif
71 -static unsigned int hash (const char *, unsigned int);
72 -#ifdef __GNUC__
73 -__inline
74 -#endif
75 -const char * libc_name_p (const char *, unsigned int);
76 %}
77 %%
78 # The standard C library functions, for feeding to gperf; the result is used
79 diff --git a/gcc/cp/cfns.h b/gcc/cp/cfns.h
80 index d8e02c9..9a37249 100644
81 --- a/gcc/cp/cfns.h
82 +++ b/gcc/cp/cfns.h
83 @@ -1,5 +1,5 @@
84 -/* ANSI-C code produced by gperf version 3.0.3 */
85 -/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L ANSI-C cfns.gperf */
86 +/* C++ code produced by gperf version 3.0.4 */
87 +/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L C++ --output-file cfns.h cfns.gperf */
89 #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
90 && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
91 @@ -28,7 +28,7 @@
92 #error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
93 #endif
95 -#line 1 "cfns.gperf"
96 +#line 3 "cfns.gperf"
98 /* Copyright (C) 2000-2016 Free Software Foundation, Inc.
100 @@ -47,25 +47,18 @@ for more details.
101 You should have received a copy of the GNU General Public License
102 along with GCC; see the file COPYING3. If not see
103 <http://www.gnu.org/licenses/>. */
104 -#ifdef __GNUC__
105 -__inline
106 -#endif
107 -static unsigned int hash (const char *, unsigned int);
108 -#ifdef __GNUC__
109 -__inline
110 -#endif
111 -const char * libc_name_p (const char *, unsigned int);
112 /* maximum key range = 391, duplicates = 0 */
114 -#ifdef __GNUC__
115 -__inline
116 -#else
117 -#ifdef __cplusplus
118 -inline
119 -#endif
120 -#endif
121 -static unsigned int
122 -hash (register const char *str, register unsigned int len)
123 +class libc_name
124 +{
125 +private:
126 + static inline unsigned int hash (const char *str, unsigned int len);
127 +public:
128 + static const char *libc_name_p (const char *str, unsigned int len);
129 +};
130 +
131 +inline unsigned int
132 +libc_name::hash (register const char *str, register unsigned int len)
133 {
134 static const unsigned short asso_values[] =
135 {
136 @@ -122,14 +115,8 @@ hash (register const char *str, register unsigned int len)
137 return hval + asso_values[(unsigned char)str[len - 1]];
138 }
140 -#ifdef __GNUC__
141 -__inline
142 -#ifdef __GNUC_STDC_INLINE__
143 -__attribute__ ((__gnu_inline__))
144 -#endif
145 -#endif
146 const char *
147 -libc_name_p (register const char *str, register unsigned int len)
148 +libc_name::libc_name_p (register const char *str, register unsigned int len)
149 {
150 enum
151 {
152 diff --git a/gcc/cp/except.c b/gcc/cp/except.c
153 index c73a16b..5336710 100644
154 --- a/gcc/cp/except.c
155 +++ b/gcc/cp/except.c
156 @@ -1040,7 +1040,8 @@ nothrow_libfn_p (const_tree fn)
157 unless the system headers are playing rename tricks, and if
158 they are, we don't want to be confused by them. */
159 id = DECL_NAME (fn);
160 - return !!libc_name_p (IDENTIFIER_POINTER (id), IDENTIFIER_LENGTH (id));
161 + return !!libc_name::libc_name_p (IDENTIFIER_POINTER (id),
162 + IDENTIFIER_LENGTH (id));
163 }
165 /* Returns nonzero if an exception of type FROM will be caught by a
166 --
167 2.9.3