This is the mail archive of the 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]
Other format: [Raw text]

Re: [PATCH 2/5] c_diagnostic_ignored_function hack

On 05/16/14 09:26, 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.

2014-05-16  Phil Muldoon  <>
	    Tom Tromey  <>

	* c-lang.c (c_diagnostic_ignored_function): New global.
	(c_print_error_function): New function.
	* c-lang.h (c_diagnostic_ignored_function): Declare.
Just a few nites.

In c-lang.c, please use the old C-style comments. If for no other reason than it's consistent with all the other nearby code. Consider using non-NULL when referring to pointers rather than non-zero. */

Otherwise OK.  Please wait to install until the entire kit is approved.

BTW, didn't see patch #5 of the series.


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