[testcase] Simplified testcases why current gcc trunk cannot compile glibc
Roland McGrath
roland@gnu.org
Mon Oct 15 13:18:00 GMT 2001
> We definitely want some mechanism by which we force static
> functions to be emitted -- referencing C from assembly like
> this is not uncommon.
Why not support it more directly? That is, something in `asm' syntax that
constitutes a proper reference to the function so that the compiler neither
warns about it being unused nor fails to emit the code.
How about a new kind of operand constraint that means "symbol name"? I
guess you can't use that syntax at top-level now. But something along
those lines seems most appropriate, i.e. marking "here is a reference"
rather than "pretend there is some reference somewhere". That way,
changing the asm code so it no longer refers to the static function gets
you the warning because it's true. (This could also let the asm code not
worry about what name the compiler chose for the function.)
More information about the Libc-alpha
mailing list