This is the mail archive of the binutils@sources.redhat.com 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]

printf as a macro


Some versions of glibc may declare printf as a macro, leading to a gcc
complaint:
  unterminated argument list invoking macro "printf"

binutils/ChangeLog
	* nm.c (print_symbol_info_bsd): Don't #ifdef inside printf in case
	printf is a macro.

Thanks to Richard Hirst for finding this one.  Committing to trunk and
2.11 branch.

Alan Modra
-- 
Linuxcare.  Support for the Revolution.

Index: binutils/nm.c
===================================================================
RCS file: /cvs/src/src/binutils/nm.c,v
retrieving revision 1.10
diff -u -p -r1.10 nm.c
--- nm.c	2000/07/27 01:39:45	1.10
+++ nm.c	2001/02/09 16:20:53
@@ -1473,13 +1473,11 @@ print_symbol_info_bsd (info, abfd)
 {
   if (bfd_is_undefined_symclass (info->type))
     {
-      printf ("%*s",
 #ifdef BFD64
-	      16,
+      printf ("%*s", 16, "");
 #else
-	      8,
+      printf ("%*s", 8, "");
 #endif
-	      "");
     }
   else
     print_value (info->value);




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