Request: goto optimization

Bas de Bakker basde.bakker@pica.nl
Tue Dec 9 01:27:00 GMT 1997


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.



More information about the Gcc-bugs mailing list