|
|
22033d |
2016-02-19 Jakub Jelinek <jakub@redhat.com>
|
|
|
22033d |
Bernd Edlinger <bernd.edlinger@hotmail.de>
|
|
|
22033d |
|
|
|
22033d |
* Make-lang.in: Invoke gperf with -L C++.
|
|
|
22033d |
* cfns.gperf: Remove prototypes for hash and libc_name_p
|
|
|
22033d |
inlines.
|
|
|
22033d |
* cfns.h: Regenerated.
|
|
|
22033d |
* except.c (nothrow_libfn_p): Adjust.
|
|
|
22033d |
|
|
|
22033d |
--- gcc/cp/Make-lang.in
|
|
|
22033d |
+++ gcc/cp/Make-lang.in
|
|
|
22033d |
@@ -112,7 +112,7 @@ else
|
|
|
22033d |
# deleting the $(srcdir)/cp/cfns.h file.
|
|
|
22033d |
$(srcdir)/cp/cfns.h:
|
|
|
22033d |
endif
|
|
|
22033d |
- gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L ANSI-C \
|
|
|
22033d |
+ gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L C++ \
|
|
|
22033d |
$(srcdir)/cp/cfns.gperf --output-file $(srcdir)/cp/cfns.h
|
|
|
22033d |
|
|
|
22033d |
#
|
|
|
22033d |
--- gcc/cp/cfns.gperf
|
|
|
22033d |
+++ gcc/cp/cfns.gperf
|
|
|
22033d |
@@ -1,3 +1,5 @@
|
|
|
22033d |
+%language=C++
|
|
|
22033d |
+%define class-name libc_name
|
|
|
22033d |
%{
|
|
|
22033d |
/* Copyright (C) 2000-2013 Free Software Foundation, Inc.
|
|
|
22033d |
|
|
|
22033d |
@@ -16,14 +18,6 @@ for more details.
|
|
|
22033d |
You should have received a copy of the GNU General Public License
|
|
|
22033d |
along with GCC; see the file COPYING3. If not see
|
|
|
22033d |
<http://www.gnu.org/licenses/>. */
|
|
|
22033d |
-#ifdef __GNUC__
|
|
|
22033d |
-__inline
|
|
|
22033d |
-#endif
|
|
|
22033d |
-static unsigned int hash (const char *, unsigned int);
|
|
|
22033d |
-#ifdef __GNUC__
|
|
|
22033d |
-__inline
|
|
|
22033d |
-#endif
|
|
|
22033d |
-const char * libc_name_p (const char *, unsigned int);
|
|
|
22033d |
%}
|
|
|
22033d |
%%
|
|
|
22033d |
# The standard C library functions, for feeding to gperf; the result is used
|
|
|
22033d |
--- gcc/cp/cfns.h
|
|
|
22033d |
+++ gcc/cp/cfns.h
|
|
|
22033d |
@@ -1,5 +1,5 @@
|
|
|
22033d |
-/* ANSI-C code produced by gperf version 3.0.3 */
|
|
|
22033d |
-/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L ANSI-C cfns.gperf */
|
|
|
22033d |
+/* C++ code produced by gperf version 3.0.4 */
|
|
|
22033d |
+/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L C++ --output-file cfns.h cfns.gperf */
|
|
|
22033d |
|
|
|
22033d |
#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
|
|
|
22033d |
&& ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
|
|
|
22033d |
@@ -28,7 +28,7 @@
|
|
|
22033d |
#error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
|
|
|
22033d |
#endif
|
|
|
22033d |
|
|
|
22033d |
-#line 1 "cfns.gperf"
|
|
|
22033d |
+#line 3 "cfns.gperf"
|
|
|
22033d |
|
|
|
22033d |
/* Copyright (C) 2000-2013 Free Software Foundation, Inc.
|
|
|
22033d |
|
|
|
22033d |
@@ -47,25 +47,18 @@ for more details.
|
|
|
22033d |
You should have received a copy of the GNU General Public License
|
|
|
22033d |
along with GCC; see the file COPYING3. If not see
|
|
|
22033d |
<http://www.gnu.org/licenses/>. */
|
|
|
22033d |
-#ifdef __GNUC__
|
|
|
22033d |
-__inline
|
|
|
22033d |
-#endif
|
|
|
22033d |
-static unsigned int hash (const char *, unsigned int);
|
|
|
22033d |
-#ifdef __GNUC__
|
|
|
22033d |
-__inline
|
|
|
22033d |
-#endif
|
|
|
22033d |
-const char * libc_name_p (const char *, unsigned int);
|
|
|
22033d |
/* maximum key range = 391, duplicates = 0 */
|
|
|
22033d |
|
|
|
22033d |
-#ifdef __GNUC__
|
|
|
22033d |
-__inline
|
|
|
22033d |
-#else
|
|
|
22033d |
-#ifdef __cplusplus
|
|
|
22033d |
-inline
|
|
|
22033d |
-#endif
|
|
|
22033d |
-#endif
|
|
|
22033d |
-static unsigned int
|
|
|
22033d |
-hash (register const char *str, register unsigned int len)
|
|
|
22033d |
+class libc_name
|
|
|
22033d |
+{
|
|
|
22033d |
+private:
|
|
|
22033d |
+ static inline unsigned int hash (const char *str, unsigned int len);
|
|
|
22033d |
+public:
|
|
|
22033d |
+ static const char *libc_name_p (const char *str, unsigned int len);
|
|
|
22033d |
+};
|
|
|
22033d |
+
|
|
|
22033d |
+inline unsigned int
|
|
|
22033d |
+libc_name::hash (register const char *str, register unsigned int len)
|
|
|
22033d |
{
|
|
|
22033d |
static const unsigned short asso_values[] =
|
|
|
22033d |
{
|
|
|
22033d |
@@ -122,14 +115,8 @@ hash (register const char *str, register
|
|
|
22033d |
return hval + asso_values[(unsigned char)str[len - 1]];
|
|
|
22033d |
}
|
|
|
22033d |
|
|
|
22033d |
-#ifdef __GNUC__
|
|
|
22033d |
-__inline
|
|
|
22033d |
-#ifdef __GNUC_STDC_INLINE__
|
|
|
22033d |
-__attribute__ ((__gnu_inline__))
|
|
|
22033d |
-#endif
|
|
|
22033d |
-#endif
|
|
|
22033d |
const char *
|
|
|
22033d |
-libc_name_p (register const char *str, register unsigned int len)
|
|
|
22033d |
+libc_name::libc_name_p (register const char *str, register unsigned int len)
|
|
|
22033d |
{
|
|
|
22033d |
enum
|
|
|
22033d |
{
|
|
|
22033d |
--- gcc/cp/except.c
|
|
|
22033d |
+++ gcc/cp/except.c
|
|
|
22033d |
@@ -1040,7 +1040,8 @@ nothrow_libfn_p (const_tree fn)
|
|
|
22033d |
unless the system headers are playing rename tricks, and if
|
|
|
22033d |
they are, we don't want to be confused by them. */
|
|
|
22033d |
id = DECL_NAME (fn);
|
|
|
22033d |
- return !!libc_name_p (IDENTIFIER_POINTER (id), IDENTIFIER_LENGTH (id));
|
|
|
22033d |
+ return !!libc_name::libc_name_p (IDENTIFIER_POINTER (id),
|
|
|
22033d |
+ IDENTIFIER_LENGTH (id));
|
|
|
22033d |
}
|
|
|
22033d |
|
|
|
22033d |
/* Returns nonzero if an exception of type FROM will be caught by a
|