This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH 2/5] c_diagnostic_ignored_function hack
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 16 May 2014 16:04:59 +0000
- Subject: Re: [PATCH 2/5] c_diagnostic_ignored_function hack
- Authentication-results: sourceware.org; auth=none
- References: <1400254001-12038-1-git-send-email-tromey at redhat dot com> <1400254001-12038-3-git-send-email-tromey at redhat dot com>
On Fri, 16 May 2014, Tom Tromey wrote:
> In the typical case, when compiling a snippet of user code, gdb wraps
> the user's text in a dummy function.
> It's somewhat odd for users if an error in their code is mentioned as
> coming from this dummy function.
> This patch makes it possible to suppress the function-name display in
> a straightforward way: it adds a new global which the plugin can set
> to declare the name of the dummy function.
> This patch seems like a bit of a hack, but there didn't seem to be a
> notably cleaner approach.
I'd say this global actually belongs somewhere in the diagnostic_context
(i.e., instead of the diagnostic_context_auxiliary_data (DC) actually
being a tree as it is at present, it should point to a structure with
whatever extra information clients wish to use to control aspects of
Joseph S. Myers