This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

Re: [PATCH] Add support for profile merging hooks


Hello,

commiting the obvious fix:

Changelog:
	* libgcov.c (__gcov_merge_add): Do not use gcov_type when inhibit_libc
	is defined.

Index: libgcov.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/libgcov.c,v
retrieving revision 1.11
diff -c -3 -p -r1.11 libgcov.c
*** libgcov.c	4 May 2003 15:20:26 -0000	1.11
--- libgcov.c	5 May 2003 05:17:45 -0000
*************** void __gcov_flush (void) { }
*** 41,49 ****
  #endif
  
  #ifdef L_gcov_merge_add
! void __gcov_merge_add (gcov_type *, unsigned);
  
! void __gcov_merge_add (gcov_type *counters, unsigned n_counters) { }
  #endif
  
  #else
--- 41,49 ----
  #endif
  
  #ifdef L_gcov_merge_add
! void __gcov_merge_add (void *, unsigned);
  
! void __gcov_merge_add (void *counters, unsigned n_counters) { }
  #endif
  
  #else

Zdenek

> 
> This part is broken.  In the case being compiled, gcov_type is undefined.
> 
> > Index: libgcov.c
> > ===================================================================
> > RCS file: /cvsroot/gcc/gcc/gcc/libgcov.c,v
> > retrieving revision 1.10
> > diff -c -3 -p -r1.10 libgcov.c
> > *** libgcov.c	24 Apr 2003 09:46:17 -0000	1.10
> > --- libgcov.c	3 May 2003 21:56:00 -0000
> > *************** Software Foundation, 59 Temple Place - S
> > *** 32,42 ****
> > --- 32,50 ----
> >   #if defined(inhibit_libc)
> >   /* If libc and its header files are not available, provide dummy functions.  */
> >   
> > + #ifdef L_gcov
> >   void __gcov_init (void *p);
> >   void __gcov_flush (void);
> >   
> >   void __gcov_init (void *p) { }
> >   void __gcov_flush (void) { }
> > + #endif
> > + 
> > + #ifdef L_gcov_merge_add
> > + void __gcov_merge_add (gcov_type *, unsigned);
> > + 
> > + void __gcov_merge_add (gcov_type *counters, unsigned n_counters) { }
> > + #endif


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