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]

Re: patch for support profiling for AIX 4.3 (fwd)


On 05-Feb-2001, Chandra Chavva <cchavva@cygnus.com> wrote:
> 
> Index: output.h
> ===================================================================
> RCS file: /cvs/gcc/egcs/gcc/output.h,v
> retrieving revision 1.54
> retrieving revision 1.53
> diff -p -r1.54 -r1.53
> *** output.h    2001/02/06 01:23:12     1.54
> --- output.h    2001/01/10 23:06:16     1.53
> *************** extern const char *user_label_prefix;
> *** 457,462 ****
>   #define STRIP_NAME_ENCODING(VAR,SYMBOL_NAME) \
>     (VAR) = ((SYMBOL_NAME) + ((SYMBOL_NAME)[0] == '*'))
>   #endif
> - /* Assign unique numbers to labels generated for profiling.  */
> - 
> - int profile_label_no;

That diff is the wrong way around.  What you actually checked in
added that code, rather than removing.  Generally it's much easier
to read diffs if they are in the standard format based on
`diff old new' rather than `diff new old'.

The code looks wrong to me -- you shouldn't define variables in header files.
Instead you should only declare them in header files, i.e.
	
	extern int profile_label_no;
	^^^^^^

and then include a separate definition in some .c file.

-- 
Fergus Henderson <fjh@cs.mu.oz.au>  |  "I have always known that the pursuit
                                    |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.

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