xref: /minix3/external/gpl3/gcc/patches/0004-fix-gcc-inlines.patch (revision 145839b147185387572ec230554d5b613fedca87)
1*145839b1SLionel Sambucdiff -rNU3 dist.orig/gcc/cp/cfns.gperf dist/gcc/cp/cfns.gperf
2*145839b1SLionel Sambuc--- dist.orig/gcc/cp/cfns.gperf	2018-08-24 00:40:38.917847976 +0200
3*145839b1SLionel Sambuc+++ dist/gcc/cp/cfns.gperf	2018-08-24 00:43:45.613142399 +0200
4*145839b1SLionel Sambuc@@ -1,3 +1,5 @@
5*145839b1SLionel Sambuc+%language=C++
6*145839b1SLionel Sambuc+%define class-name libc_name
7*145839b1SLionel Sambuc %{
8*145839b1SLionel Sambuc /* Copyright (C) 2000-2013 Free Software Foundation, Inc.
9*145839b1SLionel Sambuc
10*145839b1SLionel Sambuc@@ -16,14 +18,6 @@
11*145839b1SLionel Sambuc You should have received a copy of the GNU General Public License
12*145839b1SLionel Sambuc along with GCC; see the file COPYING3.  If not see
13*145839b1SLionel Sambuc <http://www.gnu.org/licenses/>.  */
14*145839b1SLionel Sambuc-#ifdef __GNUC__
15*145839b1SLionel Sambuc-__inline
16*145839b1SLionel Sambuc-#endif
17*145839b1SLionel Sambuc-static unsigned int hash (const char *, unsigned int);
18*145839b1SLionel Sambuc-#ifdef __GNUC__
19*145839b1SLionel Sambuc-__inline
20*145839b1SLionel Sambuc-#endif
21*145839b1SLionel Sambuc-const char * libc_name_p (const char *, unsigned int);
22*145839b1SLionel Sambuc %}
23*145839b1SLionel Sambuc %%
24*145839b1SLionel Sambuc # The standard C library functions, for feeding to gperf; the result is used
25*145839b1SLionel Sambucdiff -rNU3 dist.orig/gcc/cp/cfns.h dist/gcc/cp/cfns.h
26*145839b1SLionel Sambuc--- dist.orig/gcc/cp/cfns.h	2018-08-24 00:40:38.913848077 +0200
27*145839b1SLionel Sambuc+++ dist/gcc/cp/cfns.h	2018-08-24 00:49:31.228441865 +0200
28*145839b1SLionel Sambuc@@ -1,5 +1,5 @@
29*145839b1SLionel Sambuc-/* ANSI-C code produced by gperf version 3.0.3 */
30*145839b1SLionel Sambuc-/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L ANSI-C cfns.gperf  */
31*145839b1SLionel Sambuc+/* C++ code produced by gperf version 3.0.3 */
32*145839b1SLionel Sambuc+/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L C++ cfns.gperf  */
33*145839b1SLionel Sambuc
34*145839b1SLionel Sambuc #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
35*145839b1SLionel Sambuc       && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
36*145839b1SLionel Sambuc@@ -28,7 +28,7 @@
37*145839b1SLionel Sambuc #error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
38*145839b1SLionel Sambuc #endif
39*145839b1SLionel Sambuc
40*145839b1SLionel Sambuc-#line 1 "cfns.gperf"
41*145839b1SLionel Sambuc+#line 3 "cfns.gperf"
42*145839b1SLionel Sambuc
43*145839b1SLionel Sambuc /* Copyright (C) 2000-2013 Free Software Foundation, Inc.
44*145839b1SLionel Sambuc
45*145839b1SLionel Sambuc@@ -47,25 +47,18 @@
46*145839b1SLionel Sambuc You should have received a copy of the GNU General Public License
47*145839b1SLionel Sambuc along with GCC; see the file COPYING3.  If not see
48*145839b1SLionel Sambuc <http://www.gnu.org/licenses/>.  */
49*145839b1SLionel Sambuc-#ifdef __GNUC__
50*145839b1SLionel Sambuc-__inline
51*145839b1SLionel Sambuc-#endif
52*145839b1SLionel Sambuc-static unsigned int hash (const char *, unsigned int);
53*145839b1SLionel Sambuc-#ifdef __GNUC__
54*145839b1SLionel Sambuc-__inline
55*145839b1SLionel Sambuc-#endif
56*145839b1SLionel Sambuc-const char * libc_name_p (const char *, unsigned int);
57*145839b1SLionel Sambuc /* maximum key range = 391, duplicates = 0 */
58*145839b1SLionel Sambuc
59*145839b1SLionel Sambuc-#ifdef __GNUC__
60*145839b1SLionel Sambuc-__inline
61*145839b1SLionel Sambuc-#else
62*145839b1SLionel Sambuc-#ifdef __cplusplus
63*145839b1SLionel Sambuc-inline
64*145839b1SLionel Sambuc-#endif
65*145839b1SLionel Sambuc-#endif
66*145839b1SLionel Sambuc-static unsigned int
67*145839b1SLionel Sambuc-hash (register const char *str, register unsigned int len)
68*145839b1SLionel Sambuc+class libc_name
69*145839b1SLionel Sambuc+{
70*145839b1SLionel Sambuc+private:
71*145839b1SLionel Sambuc+  static inline unsigned int hash (const char *str, unsigned int len);
72*145839b1SLionel Sambuc+public:
73*145839b1SLionel Sambuc+  static const char *libc_name_p (const char *str, unsigned int len);
74*145839b1SLionel Sambuc+};
75*145839b1SLionel Sambuc+
76*145839b1SLionel Sambuc+inline unsigned int
77*145839b1SLionel Sambuc+libc_name::hash (register const char *str, register unsigned int len)
78*145839b1SLionel Sambuc {
79*145839b1SLionel Sambuc   static const unsigned short asso_values[] =
80*145839b1SLionel Sambuc     {
81*145839b1SLionel Sambuc@@ -122,14 +115,8 @@
82*145839b1SLionel Sambuc   return hval + asso_values[(unsigned char)str[len - 1]];
83*145839b1SLionel Sambuc }
84*145839b1SLionel Sambuc
85*145839b1SLionel Sambuc-#ifdef __GNUC__
86*145839b1SLionel Sambuc-__inline
87*145839b1SLionel Sambuc-#ifdef __GNUC_STDC_INLINE__
88*145839b1SLionel Sambuc-__attribute__ ((__gnu_inline__))
89*145839b1SLionel Sambuc-#endif
90*145839b1SLionel Sambuc-#endif
91*145839b1SLionel Sambuc const char *
92*145839b1SLionel Sambuc-libc_name_p (register const char *str, register unsigned int len)
93*145839b1SLionel Sambuc+libc_name::libc_name_p (register const char *str, register unsigned int len)
94*145839b1SLionel Sambuc {
95*145839b1SLionel Sambuc   enum
96*145839b1SLionel Sambuc     {
97*145839b1SLionel Sambucdiff -rNU3 dist.orig/gcc/cp/except.c dist/gcc/cp/except.c
98*145839b1SLionel Sambuc--- dist.orig/gcc/cp/except.c	2018-08-24 00:40:38.917847976 +0200
99*145839b1SLionel Sambuc+++ dist/gcc/cp/except.c	2018-08-24 00:49:19.820728889 +0200
100*145839b1SLionel Sambuc@@ -1025,7 +1025,8 @@
101*145839b1SLionel Sambuc      unless the system headers are playing rename tricks, and if
102*145839b1SLionel Sambuc      they are, we don't want to be confused by them.  */
103*145839b1SLionel Sambuc   id = DECL_NAME (fn);
104*145839b1SLionel Sambuc-  return !!libc_name_p (IDENTIFIER_POINTER (id), IDENTIFIER_LENGTH (id));
105*145839b1SLionel Sambuc+  return !!libc_name::libc_name_p (IDENTIFIER_POINTER (id),
106*145839b1SLionel Sambuc+		  		  IDENTIFIER_LENGTH (id));
107*145839b1SLionel Sambuc }
108*145839b1SLionel Sambuc
109*145839b1SLionel Sambuc /* Returns nonzero if an exception of type FROM will be caught by a
110*145839b1SLionel Sambucdiff -rNU3 dist.orig/gcc/cp/Make-lang.in dist/gcc/cp/Make-lang.in
111*145839b1SLionel Sambuc--- dist.orig/gcc/cp/Make-lang.in	2018-08-24 00:40:38.913848077 +0200
112*145839b1SLionel Sambuc+++ dist/gcc/cp/Make-lang.in	2018-08-24 00:41:40.240301781 +0200
113*145839b1SLionel Sambuc@@ -117,7 +117,7 @@
114*145839b1SLionel Sambuc # deleting the $(srcdir)/cp/cfns.h file.
115*145839b1SLionel Sambuc $(srcdir)/cp/cfns.h:
116*145839b1SLionel Sambuc endif
117*145839b1SLionel Sambuc-	gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L ANSI-C \
118*145839b1SLionel Sambuc+	gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L C++ \
119*145839b1SLionel Sambuc 		$(srcdir)/cp/cfns.gperf --output-file $(srcdir)/cp/cfns.h
120*145839b1SLionel Sambuc
121*145839b1SLionel Sambuc #
122