diff mbox

Mention language in compile error message

Message ID 1440011181-32004-1-git-send-email-lgustavo@codesourcery.com
State New
Headers show

Commit Message

Luis Machado Aug. 19, 2015, 7:06 p.m. UTC
This patch improves one of the compile error messages by mentioning the
language.

Before - No compiler support for this language.
After  - No compiler support for language <language>.

How does that look?

gdb/ChangeLog:

2015-08-19  Luis Machado  <lgustavo@codesourcery.com>

	* compile/compile.c (compile_to_object): Mention language in
	error message.
---
 gdb/compile/compile.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Luis Machado Aug. 24, 2015, 4:20 p.m. UTC | #1
I suppose this is obvious enough that could be pushed?

On 08/19/2015 04:06 PM, Luis Machado wrote:
> This patch improves one of the compile error messages by mentioning the
> language.
>
> Before - No compiler support for this language.
> After  - No compiler support for language <language>.
>
> How does that look?
>
> gdb/ChangeLog:
>
> 2015-08-19  Luis Machado  <lgustavo@codesourcery.com>
>
> 	* compile/compile.c (compile_to_object): Mention language in
> 	error message.
> ---
>   gdb/compile/compile.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/gdb/compile/compile.c b/gdb/compile/compile.c
> index 499c530..ff68b2d 100644
> --- a/gdb/compile/compile.c
> +++ b/gdb/compile/compile.c
> @@ -491,7 +491,8 @@ compile_to_object (struct command_line *cmd, const char *cmd_string,
>
>     /* Set up instance and context for the compiler.  */
>     if (current_language->la_get_compile_instance == NULL)
> -    error (_("No compiler support for this language."));
> +    error (_("No compiler support for language %s."),
> +	   current_language->la_name);
>     compiler = current_language->la_get_compile_instance ();
>     cleanup = make_cleanup (cleanup_compile_instance, compiler);
>
>
Pedro Alves Aug. 24, 2015, 5:20 p.m. UTC | #2
On 08/19/2015 08:06 PM, Luis Machado wrote:
> This patch improves one of the compile error messages by mentioning the
> language.
> 
> Before - No compiler support for this language.
> After  - No compiler support for language <language>.
> 
> How does that look?
> 
> gdb/ChangeLog:
> 
> 2015-08-19  Luis Machado  <lgustavo@codesourcery.com>
> 
> 	* compile/compile.c (compile_to_object): Mention language in
> 	error message.

OK.

Thanks,
Pedro Alves
Luis Machado Aug. 27, 2015, 5:05 a.m. UTC | #3
On 08/24/2015 02:20 PM, Pedro Alves wrote:
> On 08/19/2015 08:06 PM, Luis Machado wrote:
>> This patch improves one of the compile error messages by mentioning the
>> language.
>>
>> Before - No compiler support for this language.
>> After  - No compiler support for language <language>.
>>
>> How does that look?
>>
>> gdb/ChangeLog:
>>
>> 2015-08-19  Luis Machado  <lgustavo@codesourcery.com>
>>
>> 	* compile/compile.c (compile_to_object): Mention language in
>> 	error message.
>
> OK.

I've pushed this now.

Thanks.
diff mbox

Patch

diff --git a/gdb/compile/compile.c b/gdb/compile/compile.c
index 499c530..ff68b2d 100644
--- a/gdb/compile/compile.c
+++ b/gdb/compile/compile.c
@@ -491,7 +491,8 @@  compile_to_object (struct command_line *cmd, const char *cmd_string,
 
   /* Set up instance and context for the compiler.  */
   if (current_language->la_get_compile_instance == NULL)
-    error (_("No compiler support for this language."));
+    error (_("No compiler support for language %s."),
+	   current_language->la_name);
   compiler = current_language->la_get_compile_instance ();
   cleanup = make_cleanup (cleanup_compile_instance, compiler);