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

inc


Hello,

this source:

  long var_x;
  ...
  var_x++;
  ...

generate code(with -O2 switch):

  movl var_x, %eax
  incl %eax
  movl %eax, var_x

why it can't generate just

  incl var_x


gcc -v
gcc version 3.2.3 (mingw special 20030504-1)

-- 
Best regards,
 RomikB                          mailto:romikb@mail.ru


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