This is the mail archive of the
mailing list for the GCC project.
Re: PATCH: flag_external and DECL_EXTERNAL documentation
- To: Jason Merrill <jason at redhat dot com>
- Subject: Re: PATCH: flag_external and DECL_EXTERNAL documentation
- From: Lars Brinkhoff <lars dot spam at nocrew dot org>
- Date: 01 Feb 2001 09:00:15 +0100
- Cc: gcc-patches at gcc dot gnu dot org
- Organization: nocrew
- References: <firstname.lastname@example.org> <email@example.com>
Jason Merrill <firstname.lastname@example.org> 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?
2001-02-01 lars brinkhoff <email@example.com>
* tree.h (DECL_EXTERNAL): update comment.
RCS file: /cvs/gcc/gcc/gcc/tree.h,v
retrieving revision 1.222
diff -u -r1.222 tree.h
--- tree.h 2001/01/30 01:38:41 1.222
+++ tree.h 2001/02/01 07:54:54
@@ -1418,9 +1418,10 @@
/* Language-specific decl information. */
#define DECL_LANG_SPECIFIC(NODE) (DECL_CHECK (NODE)->decl.lang_specific)
-/* 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. */
#define DECL_EXTERNAL(NODE) (DECL_CHECK (NODE)->decl.external_flag)
/* In a VAR_DECL for a RECORD_TYPE, sets number for non-init_priority