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

Request: goto optimization


Dear egcs maintainers,

I've noticed that

extern void foo(void);
goto *&foo;

compiles to (on a Pentium)

	movl $foo,%eax
	jmp *%eax

instead of the more obvious

	jmp foo

This may seem an unlikely construct to use, but it occurs very often
in the C code generated by the Mercury compiler.

Regards,
Bas de Bakker.


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