This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Seeking example C code which triggers stmt.c:expand_decl_init()
- To: gcc at gcc dot gnu dot org
- Subject: Seeking example C code which triggers stmt.c:expand_decl_init()
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Date: Sat, 9 Jun 2001 23:08:18 -0400 (EDT)
I was poking around looking for spots where we missed adding
BOOLEAN_TYPE, and noticed the following. Before adding that code, I
wanted to know when this fragment is triggered and couldn't write
something that used it. Can someone please show me example C code
which causes gcc to enter stmt.c:expand_decl_init() and the snippet
below?
>/* Compute and store the initial value now. */
>
>if (DECL_INITIAL (decl) == error_mark_node)
> {
> enum tree_code code = TREE_CODE (TREE_TYPE (decl));
>
> if (code == INTEGER_TYPE || code == REAL_TYPE || code == ENUMERAL_TYPE
> || code == POINTER_TYPE || code == REFERENCE_TYPE)
> expand_assignment (decl, convert (TREE_TYPE (decl), integer_zero_node),
> 0, 0);
> emit_queue ();
> }
TIA,
--Kaveh
--
Kaveh R. Ghazi Engagement Manager / Project Services
ghazi@caip.rutgers.edu Qwest Internet Solutions