• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Révisionec1cc0263f156f70693a62cf17b254a0029f4852 (tree)
l'heure2016-02-20 07:13:29
Auteuredlinger <edlinger@138b...>
Commiteredlinger

Message de Log

2016-02-19 Jakub Jelinek <jakub@redhat.com>

Bernd Edlinger <bernd.edlinger@hotmail.de>
        • Make-lang.in: Invoke gperf with -L C++.
        • cfns.gperf: Remove prototypes for hash and libc_name_p
          inlines.
        • cfns.h: Regenerated.
        • except.c (nothrow_libfn_p): Adjust.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233572 138bc75d-0d04-0410-961f-82ee72b054a4

Change Summary

Modification

--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,4 +1,13 @@
11 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>
211
312 PR c++/69850
413 * rtti.c (ifnonnull): Set TREE_NO_WARNING on the condition, use
--- a/gcc/cp/Make-lang.in
+++ b/gcc/cp/Make-lang.in
@@ -112,7 +112,7 @@ else
112112 # deleting the $(srcdir)/cp/cfns.h file.
113113 $(srcdir)/cp/cfns.h:
114114 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++ \
116116 $(srcdir)/cp/cfns.gperf --output-file $(srcdir)/cp/cfns.h
117117
118118 #
--- a/gcc/cp/cfns.gperf
+++ b/gcc/cp/cfns.gperf
@@ -1,3 +1,5 @@
1+%language=C++
2+%define class-name libc_name
13 %{
24 /* Copyright (C) 2000-2016 Free Software Foundation, Inc.
35
@@ -16,14 +18,6 @@ for more details.
1618 You should have received a copy of the GNU General Public License
1719 along with GCC; see the file COPYING3. If not see
1820 <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);
2721 %}
2822 %%
2923 # The standard C library functions, for feeding to gperf; the result is used
--- a/gcc/cp/cfns.h
+++ b/gcc/cp/cfns.h
@@ -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 */
33
44 #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
55 && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
@@ -28,7 +28,7 @@
2828 #error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
2929 #endif
3030
31-#line 1 "cfns.gperf"
31+#line 3 "cfns.gperf"
3232
3333 /* Copyright (C) 2000-2016 Free Software Foundation, Inc.
3434
@@ -47,25 +47,18 @@ for more details.
4747 You should have received a copy of the GNU General Public License
4848 along with GCC; see the file COPYING3. If not see
4949 <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);
5850 /* maximum key range = 391, duplicates = 0 */
5951
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)
6962 {
7063 static const unsigned short asso_values[] =
7164 {
@@ -122,14 +115,8 @@ hash (register const char *str, register unsigned int len)
122115 return hval + asso_values[(unsigned char)str[len - 1]];
123116 }
124117
125-#ifdef __GNUC__
126-__inline
127-#ifdef __GNUC_STDC_INLINE__
128-__attribute__ ((__gnu_inline__))
129-#endif
130-#endif
131118 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)
133120 {
134121 enum
135122 {
--- a/gcc/cp/except.c
+++ b/gcc/cp/except.c
@@ -1040,7 +1040,8 @@ nothrow_libfn_p (const_tree fn)
10401040 unless the system headers are playing rename tricks, and if
10411041 they are, we don't want to be confused by them. */
10421042 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));
10441045 }
10451046
10461047 /* Returns nonzero if an exception of type FROM will be caught by a