This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


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

[RFA] Fix unbraced while expr in p-typeprint.c


  The following patch is needed to get p-typeprint.c to compile correctly.
(I got no warning with cygwin nor djgpp compiler probably because
the preprocessor replace the isdigit into a braced expression !)
This is the kind of unexpected behavior that I really dislike about C
(or more precisely about macros in C).

ChangeLog: 

2000-07-05  Pierre Muller <muller@ics.u-strasbg.fr>
    * p-typeprint.c (pascal_type_print_method_args): add braces around
isdigit after while keyword.
  

Index: p-typeprint.c
===================================================================
RCS file: /cvs/src/src/gdb/p-typeprint.c,v
retrieving revision 1.1
diff -c -r1.1 p-typeprint.c
*** p-typeprint.c	2000/06/14 12:27:59	1.1
--- p-typeprint.c	2000/07/05 11:47:10
***************
*** 170,180 ****
        char *argname;
        fputs_filtered (" (", stream);
        /* we must demangle this */
!       while isdigit
! 	(physname[0])
  	{
! 	  while isdigit
! 	    (physname[len])
  	    {
  	      len++;
  	    }
--- 170,178 ----
        char *argname;
        fputs_filtered (" (", stream);
        /* we must demangle this */
!       while (isdigit(physname[0]))
  	{
! 	  while (isdigit(physname[len]))
  	    {
  	      len++;
  	    }



Pierre Muller
Institut Charles Sadron
6,rue Boussingault
F 67083 STRASBOURG CEDEX (France)
mailto:muller@ics.u-strasbg.fr
Phone : (33)-3-88-41-40-07  Fax : (33)-3-88-41-40-99

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