This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


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

Re: [testcase] Simplified testcases why current gcc trunk cannot compile glibc


> 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.)


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