This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Don't set function's DECL_NAME to an EXPR_WFL
- To: Per Bothner <per at bothner dot com>
- Subject: Re: [PATCH] Don't set function's DECL_NAME to an EXPR_WFL
- From: Alexandre Petit-Bianco <apbianco at cygnus dot com>
- Date: Sun, 21 Jan 2001 14:16:22 -0800 (PST)
- Cc: gcc-patches at gcc dot gnu dot org, java-discuss at sources dot redhat dot com
- References: <m2ofx03b8v.fsf@kelso.bothner.com>
- Reply-To: apbianco at cygnus dot com
Per Bothner writes:
> I'm about to check the following patch in. Alex may not care for
> the patch, as it may reduce the ability of gcj to give precise error
> messages. However, setting the DECL_NAME of a FUNCTION_DECL
> to a EXPR_WITH_FILE_LOCATION did cause the compiler to crash -
> I don't remember exactly where, but it was in the non-java-specific
> parts of the gcc.
That's because it hasn't been substitued with the DECL_NAME before
going through expand_expr. I can fix that if you provide me with a
test case.
> It is no doubt possible to fix the crash by other means. But
> setting the DECL_NAME to a EXPR_WITH_FILE_LOCATION just seems like
> the wrong thing to do, so I got rid of it.
We relie on it for precise error message. The front-end parser relies
on it a lot. Removing it seems to be too risky for 3.0.
I'd prefer you hold this patch back.
./A