From: Andreas Schwab Date: Fri, 6 Jul 2012 19:50:17 +0000 (+0200) Subject: * make-docfile.c (write_globals): Warn about duplicate function X-Git-Tag: emacs-24.2.90~1199^2~168 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9c32bf45f491d35641751533eb5e399306b60947;p=emacs.git * make-docfile.c (write_globals): Warn about duplicate function definitions with differing signatures. --- diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 54e9e405cfd..11f2a688cd2 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,8 @@ +2012-07-06 Andreas Schwab + + * make-docfile.c (write_globals): Warn about duplicate function + definitions with differing signatures. + 2012-07-03 Paul Eggert * make-docfile.c (scan_c_file): Suppress GCC warning. diff --git a/lib-src/make-docfile.c b/lib-src/make-docfile.c index 4e961bb56ed..99c43da97f5 100644 --- a/lib-src/make-docfile.c +++ b/lib-src/make-docfile.c @@ -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)