This is the mail archive of the gcc@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]

Would like to make one version of is_too_expensive in gcse.c and cprop.c


The routines declared as

static bool
is_too_expensive (const char *pass)

in both cprop.c and gcse.c are identical except for two comment lines.

I'd like to modify is_too_expensive, which implied to me that there should be only one copy of the routine.

Would it be reasonable to add an extern declaration of is_too_expensive (with perhaps a more descriptive name) in gcse.h, remove the static declaration from gcse.c, include gcse.h in cprop.c?

(I realize this is a very simple question for regular C programmers, but I'm not a regular C programmer, sorry).

Thanks.

Brad


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