* make-docfile.c (write_globals): Warn about duplicate function

definitions with differing signatures.
This commit is contained in:
Andreas Schwab 2012-07-06 21:50:17 +02:00
parent ddadbc0e71
commit 9c32bf45f4
2 changed files with 12 additions and 1 deletions

View 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.

View 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)