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: incorrect cost calculation in estimate_num_insns_1


On Jul 16, 2004, at 3:16 AM, Krister Walfridsson wrote:
I stumbled on a bug in estimate_num_insns_1 where it modifies a
pointer with

*count++;

where the code (and comment) indicates that

*count += 1;

was intended.

Hum, I can't help but think that someone in another 3 months will change the later form back into the first form.


Could we do:

(*count)++;

or even:

++ *count;

instead?


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