Révision | ec1cc0263f156f70693a62cf17b254a0029f4852 (tree) |
---|---|
l'heure | 2016-02-20 07:13:29 |
Auteur | edlinger <edlinger@138b...> |
Commiter | edlinger |
2016-02-19 Jakub Jelinek <jakub@redhat.com>
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233572 138bc75d-0d04-0410-961f-82ee72b054a4
@@ -1,4 +1,13 @@ | ||
1 | 1 | 2016-02-19 Jakub Jelinek <jakub@redhat.com> |
2 | + Bernd Edlinger <bernd.edlinger@hotmail.de> | |
3 | + | |
4 | + * Make-lang.in: Invoke gperf with -L C++. | |
5 | + * cfns.gperf: Remove prototypes for hash and libc_name_p | |
6 | + inlines. | |
7 | + * cfns.h: Regenerated. | |
8 | + * except.c (nothrow_libfn_p): Adjust. | |
9 | + | |
10 | +2016-02-19 Jakub Jelinek <jakub@redhat.com> | |
2 | 11 | |
3 | 12 | PR c++/69850 |
4 | 13 | * rtti.c (ifnonnull): Set TREE_NO_WARNING on the condition, use |
@@ -112,7 +112,7 @@ else | ||
112 | 112 | # deleting the $(srcdir)/cp/cfns.h file. |
113 | 113 | $(srcdir)/cp/cfns.h: |
114 | 114 | endif |
115 | - gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L ANSI-C \ | |
115 | + gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L C++ \ | |
116 | 116 | $(srcdir)/cp/cfns.gperf --output-file $(srcdir)/cp/cfns.h |
117 | 117 | |
118 | 118 | # |
@@ -1,3 +1,5 @@ | ||
1 | +%language=C++ | |
2 | +%define class-name libc_name | |
1 | 3 | %{ |
2 | 4 | /* Copyright (C) 2000-2016 Free Software Foundation, Inc. |
3 | 5 |
@@ -16,14 +18,6 @@ for more details. | ||
16 | 18 | You should have received a copy of the GNU General Public License |
17 | 19 | along with GCC; see the file COPYING3. If not see |
18 | 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 | 23 | # The standard C library functions, for feeding to gperf; the result is used |
@@ -1,5 +1,5 @@ | ||
1 | -/* ANSI-C code produced by gperf version 3.0.3 */ | |
2 | -/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L ANSI-C cfns.gperf */ | |
1 | +/* C++ code produced by gperf version 3.0.4 */ | |
2 | +/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L C++ --output-file cfns.h cfns.gperf */ | |
3 | 3 | |
4 | 4 | #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ |
5 | 5 | && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ |
@@ -28,7 +28,7 @@ | ||
28 | 28 | #error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>." |
29 | 29 | #endif |
30 | 30 | |
31 | -#line 1 "cfns.gperf" | |
31 | +#line 3 "cfns.gperf" | |
32 | 32 | |
33 | 33 | /* Copyright (C) 2000-2016 Free Software Foundation, Inc. |
34 | 34 |
@@ -47,25 +47,18 @@ for more details. | ||
47 | 47 | You should have received a copy of the GNU General Public License |
48 | 48 | along with GCC; see the file COPYING3. If not see |
49 | 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 | 50 | /* maximum key range = 391, duplicates = 0 */ |
59 | 51 | |
60 | -#ifdef __GNUC__ | |
61 | -__inline | |
62 | -#else | |
63 | -#ifdef __cplusplus | |
64 | -inline | |
65 | -#endif | |
66 | -#endif | |
67 | -static unsigned int | |
68 | -hash (register const char *str, register unsigned int len) | |
52 | +class libc_name | |
53 | +{ | |
54 | +private: | |
55 | + static inline unsigned int hash (const char *str, unsigned int len); | |
56 | +public: | |
57 | + static const char *libc_name_p (const char *str, unsigned int len); | |
58 | +}; | |
59 | + | |
60 | +inline unsigned int | |
61 | +libc_name::hash (register const char *str, register unsigned int len) | |
69 | 62 | { |
70 | 63 | static const unsigned short asso_values[] = |
71 | 64 | { |
@@ -122,14 +115,8 @@ hash (register const char *str, register unsigned int len) | ||
122 | 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 | 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 | 121 | enum |
135 | 122 | { |
@@ -1040,7 +1040,8 @@ nothrow_libfn_p (const_tree fn) | ||
1040 | 1040 | unless the system headers are playing rename tricks, and if |
1041 | 1041 | they are, we don't want to be confused by them. */ |
1042 | 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 | 1047 | /* Returns nonzero if an exception of type FROM will be caught by a |