bug-cppi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-cppi] Invalid tweaking of GPerf output


From: Akim Demaille
Subject: [bug-cppi] Invalid tweaking of GPerf output
Date: Thu, 29 Mar 2012 14:55:10 +0200

I've also needed this patch.  Was not part of the first
batch because I was looking for it in gperf, but really
it's in cppi that the problem is.  Below is the diff
straight-from-gperf as-patched-by-cppi of cpp-cond.c:

As you can see the first hunk has twice "static", which
my gcc dislikes.

--- s   2012-03-29 14:42:22.000000000 +0200
+++ src/cpp-cond.c      2012-03-29 14:41:01.000000000 +0200
@@ -31,20 +31,21 @@
 #line 1 "../../src/cpp.gp"
 struct KW {char const *name; int code;};
 
 #define TOTAL_KEYWORDS 9
 #define MIN_WORD_LENGTH 2
 #define MAX_WORD_LENGTH 6
 #define MIN_HASH_VALUE 0
 #define MAX_HASH_VALUE 55
 /* maximum key range = 56, duplicates = 0 */
 
+static
 #if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || 
defined(__cplusplus) || defined(__GNUC_STDC_INLINE__)
 inline
 #elif defined(__GNUC__)
 __inline
 #endif
 static unsigned int
 hash (register const char *str, register unsigned int len)
 {
   static const unsigned char asso_values[] =
     {
@@ -96,20 +97,21 @@
       /*FALLTHROUGH*/
       case 1:
         hval += asso_values[(unsigned char)str[0]];
         break;
     }
   return hval;
 }
 
 #ifdef __GNUC__
 __inline
+static
 #if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__
 __attribute__ ((__gnu_inline__))
 #endif
 #endif
 const struct KW *
 cpp_cond_lookup (register const char *str, register unsigned int len)
 {
   static const struct KW wordlist[] =
     {
 #line 11 "../../src/cpp.gp"



Attachment: 0001-build-fix-gperf-fix.patch
Description: Binary data


BTW, I have a number of non-gitignored files.  What is supposed
to happen with these guys?

~/src/gnu/cppi $ git st
# On branch master
# Your branch is ahead of 'origin/master' by 3 commits.
#
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#       po/Makefile.in.in
#       po/Makevars.template
#       po/Rules-quot
#       po/boldquot.sed
#       po/address@hidden
#       po/address@hidden
#       po/insert-header.sin
#       po/quot.sed
#       po/remove-potcdate.sin


reply via email to

[Prev in Thread] Current Thread [Next in Thread]