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.
> 
> I guess __attribute__((unused)) seems as good a way as any.

It is existing practice to use `__attribute__((unused))' on functions
defined in header files to suppress the warnings, with the expectation that
they will be optimized out rather than become dead code.  I don't know that
this practice is entirely wise (that's what `extern inline' is for), but it
has been done and is consistent with what the GCC manual says about
`unused' (i.e., the manual mentions suppressing the warning, implying that
is the primary reason for using it and it might have reasonably been
inferred that it doesn't have other effects that might be detrimental to
optimization).  So I don't think it would be ideal to change that behavior.


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