bug-binutils
[Top][All Lists]
Advanced

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

Possibly a typo in function prototype


From: pbo
Subject: Possibly a typo in function prototype
Date: Tue, 6 May 2014 10:27:05 +0800
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

Hello

I tried to build binutils-2.11.94 with --target=arm-fsl-linux-gnueabi and I got a compilation error:

gcc -DHAVE_CONFIG_H -I. -I../../binutils-2.11.94/gas -I. -D_GNU_SOURCE -I. -I../../binutils-2.11.94/gas -I../bfd -I../../binutils-2.11.94/gas/config -I../../binutils-2.11.94/gas/../include -I../../binutils-2.11.94/gas/.. -I../../binutils-2.11.94/gas/../bfd -I../../binutils-2.11.94/gas/../intl -I../intl -DLOCALEDIR="\"/home/kontinuation/work/crossbuild/crosstool/share/locale\"" -W -Wall -Wstrict-prototypes -Wmissing-prototypes -g -O2 -c ../../binutils-2.11.94/gas/config/tc-arm.c
../../binutils-2.11.94/gas/config/tc-arm.c: In function ‘my_get_expression’:
../../binutils-2.11.94/gas/config/tc-arm.c:4467:10: warning: variable ‘seg’ set but not used [-Wunused-but-set-variable] ../../binutils-2.11.94/gas/config/tc-arm.c: In function ‘vfp_dp_reg_required_here’: ../../binutils-2.11.94/gas/config/tc-arm.c:6428:26: error: argument ‘pos’ doesn’t match prototype ../../binutils-2.11.94/gas/config/tc-arm.c:901:12: error: prototype declaration

Then I browsed the source code and found it might be caused by a typo in function definition, so I made the following changes to make it compile:

diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
index 456e8c5..162553f 100644
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
@@ -6425,7 +6425,7 @@ vfp_sp_reg_required_here (str, pos)
 static int
 vfp_dp_reg_required_here (str, pos)
      char **str;
-     enum vfp_sp_reg_pos pos;
+     enum vfp_dp_reg_pos pos;
 {
   int   reg;
   char *start = *str;

So I wonder is it really a typo or it's just my misconfiguration of binutils?

---------------------------------------------------------------------------------------------------
Confidentiality Notice: The information contained in this e-mail and any accompanying attachment(s) is intended only for the use of the intended recipient and may be confidential and/or privileged of Neusoft Corporation, its subsidiaries and/or its affiliates. If any reader of this communication is not the intended recipient, unauthorized use, forwarding, printing, storing, disclosure or copying is strictly prohibited, and may be unlawful.If you have received this communication in error,please immediately notify the sender by return e-mail, and delete the original message and all copies from your system. Thank you. ---------------------------------------------------------------------------------------------------
reply via email to

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