This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH: Fix gold check failures


Hi,

On Fedora 12, gold check failed with

gcc -DHAVE_CONFIG_H -I. -I/export/gnu/import/git/binutils/gold/testsuite
-I..  -I/export/gnu/import/git/binutils/gold/testsuite
-I/export/gnu/import/git/binutils/gold/testsuite/..
-I/export/gnu/import/git/binutils/gold/testsuite/../../include
-I/export/gnu/import/git/binutils/gold/testsuite/../../elfcpp -I..
-DLOCALEDIR="\"/usr/local/share/locale\""   -W -Wall -Wstrict-prototypes
-Wmissing-prototypes -Wshadow -Werror -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -fmerge-constants -g -O2 -MT
plugin_common_test_1.o -MD -MP -MF .deps/plugin_common_test_1.Tpo -c -o
plugin_common_test_1.o
/export/gnu/import/git/binutils/gold/testsuite/plugin_common_test_1.c
cc1: warnings being treated as errors
/export/gnu/import/git/binutils/gold/testsuite/plugin_common_test_1.c:
In function âmainâ:
/export/gnu/import/git/binutils/gold/testsuite/plugin_common_test_1.c:38:
error: implicit declaration of function âfooâ
make[7]: *** [plugin_common_test_1.o] Error 1

I am checking in this as an obvious fix.


H.J.
---
diff --git a/gold/ChangeLog b/gold/ChangeLog
index e9b79d4..f668ead 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -1,3 +1,8 @@
+2010-04-09  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* testsuite/plugin_common_test_1.c (foo): Add prototype.
+	* testsuite/plugin_common_test_2.c (foo): Likewise.
+
 2010-04-08  Doug Kwan  <dougkwan@google.com>
 
 	* merge.cc (Output_merge_data::set_final_data_size): Handle empty
diff --git a/gold/testsuite/plugin_common_test_1.c b/gold/testsuite/plugin_common_test_1.c
index cf9ca2f..262c298 100644
--- a/gold/testsuite/plugin_common_test_1.c
+++ b/gold/testsuite/plugin_common_test_1.c
@@ -32,6 +32,8 @@ extern int c3;
 int c4;
 int c5 = 50;
 
+extern void foo (void);
+
 int
 main (int argc __attribute__ ((unused)), char** argv __attribute__ ((unused)))
 {
diff --git a/gold/testsuite/plugin_common_test_2.c b/gold/testsuite/plugin_common_test_2.c
index 149fd45..54139ce 100644
--- a/gold/testsuite/plugin_common_test_2.c
+++ b/gold/testsuite/plugin_common_test_2.c
@@ -32,8 +32,10 @@ int c3;
 int c4 = 40;
 int c5;
 
+extern void foo (void);
+
 void
-foo ()
+foo (void)
 {
   c1 = 10;
   c2 = 20;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]