This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [PATCH] Don't set function's DECL_NAME to an EXPR_WFL



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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]