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


Matt Austern <austern@apple.com> writes:

> On Saturday, August 23, 2003, at 04:36  PM, Zack Weinberg wrote:
>> Geoff Keating <geoffk@geoffk.org> writes:
>>> 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?
>>
>> How about "must appear before the first use of the function"?
>
> I like Geoff's rule because it's simple to specify and because it's
> easy to know whether you've violating it by examining the program
> text.

Granted, however, I'm worried about breaking existing code.

> I think there are some corner cases that make defining "first use" a
> bit slippery.

In standardese, I think "must appear before the first occurrence of
the identifier that does not constitute a declaration of that
identifier without an initializer" is tight enough; it even gets

void *weird_variable = &weird_variable;
void *weird_variable asm("with_a_special_name");

right.

zw


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