This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: Allow cgraph nodes to change name


Geoff Keating <geoffk@geoffk.org> writes:

> because without unit-at-a-time, the function is output before GCC
> knows it has a different name.  I think we want to make it invalid,
> otherwise we have to do unit-at-a-time always which is too expensive
> for -O0.

I think we should make unit-at-a-time cheap enough that it can be not
just on at -O0, but impossible to turn off.  There are some nice front
end cleanups that would fall out of that.

> I think we should simply declare that you must use asm("") only on the
> very first declaration of a function, and enforce this with an error
> message.  Does that make sense to you?

That might be a bit too strict for e.g. glibc with generic
declarations in <foo.h> and then reading system-specific declarations
from <bits/foo.h>.

How about "must appear before the first use of the function"?

zw


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