This is the mail archive of the
mailing list for the GCC project.
Re: PATCH: flag_external and DECL_EXTERNAL documentation
- To: Lars Brinkhoff <lars dot spam at nocrew dot org>
- Subject: Re: PATCH: flag_external and DECL_EXTERNAL documentation
- From: Jason Merrill <jason at redhat dot com>
- Date: 01 Feb 2001 11:27:52 +0000
- Cc: gcc-patches at gcc dot gnu dot org
- References: <email@example.com><firstname.lastname@example.org><email@example.com>
>>>>> "Lars" == Lars Brinkhoff <firstname.lastname@example.org> writes:
> Jason Merrill <email@example.com> writes:
>> No, this is wrong. DECL_EXTERNAL is set on a function declaration when
>> created, but it is cleared in start_function if the declaration is also a
> Right. How about this patch?
> -/* In a VAR_DECL or FUNCTION_DECL,
> - nonzero means external reference:
> - do not allocate storage, and refer to a definition elsewhere. */
> +/* In a VAR_DECL or FUNCTION_DECL, nonzero means external reference:
> + do not allocate storage, and refer to a definition elsewhere.
> + Note that DECL_EXTERNAL is always set when a non-nested function is
> + declared, and cleared when the function definition is encountered. */
This is describing C-specific behavior, and should not be in a backend
file. In C, function declarations are implicitly extern, but this may not
be true of other languages.
I think the existing comment is fine.