This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Allow cgraph nodes to change name
- From: "Zack Weinberg" <zack at codesourcery dot com>
- To: Matt Austern <austern at apple dot com>
- Cc: Geoff Keating <geoffk at geoffk dot org>, Jan Hubicka <hubicka at ucw dot cz>, gcc-patches at gcc dot gnu dot org
- Date: Sun, 24 Aug 2003 13:51:00 -0700
- Subject: Re: Allow cgraph nodes to change name
- References: <2A37B4DA-D673-11D7-93FC-000393B2ABA2@apple.com>
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