]> code.delx.au - gnu-emacs/commitdiff
* make-docfile.c (write_globals): Warn about duplicate function
authorAndreas Schwab <schwab@linux-m68k.org>
Fri, 6 Jul 2012 19:50:17 +0000 (21:50 +0200)
committerAndreas Schwab <schwab@linux-m68k.org>
Fri, 6 Jul 2012 19:50:17 +0000 (21:50 +0200)
definitions with differing signatures.

lib-src/ChangeLog
lib-src/make-docfile.c

index 54e9e405cfdb24ae93307ca55d83f9c2beba180c..11f2a688cd25f5e563dfd3f59e39a62a70c3d9f9 100644 (file)
@@ -1,3 +1,8 @@
+2012-07-06  Andreas Schwab  <schwab@linux-m68k.org>
+
+       * make-docfile.c (write_globals): Warn about duplicate function
+       definitions with differing signatures.
+
 2012-07-03  Paul Eggert  <eggert@cs.ucla.edu>
 
        * make-docfile.c (scan_c_file): Suppress GCC warning.
index 4e961bb56edb29bd0e17a93655932f7470dbfbdf..99c43da97f56fb882e6f4588a77175d9c1d15d33 100644 (file)
@@ -693,7 +693,13 @@ write_globals (void)
 
       while (i + 1 < num_globals
             && !strcmp (globals[i].name, globals[i + 1].name))
-       ++i;
+       {
+         if (globals[i].type == FUNCTION
+             && globals[i].value != globals[i + 1].value)
+           error ("function '%s' defined twice with differing signatures",
+                  globals[i].name);
+         ++i;
+       }
     }
 
   if (!seen_defun)