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