Ticket #2990: gcc-4.9.3-20170404-1.patch

File gcc-4.9.3-20170404-1.patch, 4.1 KB (added by Worth Burruss, on 04/11/17 at 13:46:55)
  • gcc/cp/cfns.gperf

    diff -Naur gcc-4.9.3-orig/gcc/cp/cfns.gperf gcc-4.9.3-fixed/gcc/cp/cfns.gperf
    old new  
     1%language=C++
     2%define class-name libc_name
    13%{
    24/* Copyright (C) 2000-2014 Free Software Foundation, Inc.
    35
     
    1618You should have received a copy of the GNU General Public License
    1719along 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
  • gcc/cp/cfns.h

    diff -Naur gcc-4.9.3-orig/gcc/cp/cfns.h gcc-4.9.3-fixed/gcc/cp/cfns.h
    old new  
    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) \
     
    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-2014 Free Software Foundation, Inc.
    3434
     
    4747You should have received a copy of the GNU General Public License
    4848along 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)
     52class libc_name
     53{
     54private:
     55  static inline unsigned int hash (const char *str, unsigned int len);
     56public:
     57  static const char *libc_name_p (const char *str, unsigned int len);
     58};
     59
     60inline unsigned int
     61libc_name::hash (register const char *str, register unsigned int len)
    6962{
    7063  static const unsigned short asso_values[] =
    7164    {
     
    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
    131118const char *
    132 libc_name_p (register const char *str, register unsigned int len)
     119libc_name::libc_name_p (register const char *str, register unsigned int len)
    133120{
    134121  enum
    135122    {
  • gcc/cp/except.c

    diff -Naur gcc-4.9.3-orig/gcc/cp/except.c gcc-4.9.3-fixed/gcc/cp/except.c
    old new  
    10301030     unless the system headers are playing rename tricks, and if
    10311031     they are, we don't want to be confused by them.  */
    10321032  id = DECL_NAME (fn);
    1033   return !!libc_name_p (IDENTIFIER_POINTER (id), IDENTIFIER_LENGTH (id));
     1033  return !!libc_name::libc_name_p (IDENTIFIER_POINTER (id),
     1034                                  IDENTIFIER_LENGTH (id));
    10341035}
    10351036
    10361037/* Returns nonzero if an exception of type FROM will be caught by a
  • gcc/cp/Make-lang.in

    diff -Naur gcc-4.9.3-orig/gcc/cp/Make-lang.in gcc-4.9.3-fixed/gcc/cp/Make-lang.in
    old new  
    111111# deleting the $(srcdir)/cp/cfns.h file.
    112112$(srcdir)/cp/cfns.h:
    113113endif
    114         gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L ANSI-C \
     114        gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L C++ \
    115115                $(srcdir)/cp/cfns.gperf --output-file $(srcdir)/cp/cfns.h
    116116
    117117#