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]
Other format: [Raw text]

Re: c-decl.c overhaul (1/3) Refactor duplicate_decls


"Joseph S. Myers" <jsm@polyomino.org.uk> writes:

> On Sat, 10 Jan 2004, Zack Weinberg wrote:
>
>> +	  inform ("a parameter list with an ellipsis can't match"
>> +		  "an empty parameter name list declaration");
>
> This message (and the one below it) is missing a space between the two 
> concatenated parts of the string.

Fixed with appended patch.

> A testcase also gets the messages duplicated:
>
> 	void f();
> 	void f(int, ...);

Heh.  This is the shortest example of what's wrong with the current
data structures that I've seen yet.  There's no simple fix, but expect
it to be cured by patches 2 and 3 in this series.  If you can figure
out some way to make gcc.dg test for the double error message that
would be really cool.

zw

        * c-decl.c (diagnose_arglist_conflict): Add missing space to
        diagnostic messages.

===================================================================
Index: c-decl.c
--- c-decl.c	11 Jan 2004 01:18:51 -0000	1.467
+++ c-decl.c	11 Jan 2004 22:39:23 -0000
@@ -818,14 +818,14 @@ diagnose_arglist_conflict (tree newdecl,
       if (TREE_CHAIN (t) == 0
 	  && TYPE_MAIN_VARIANT (type) != void_type_node)
 	{
-	  inform ("a parameter list with an ellipsis can't match"
+	  inform ("a parameter list with an ellipsis can't match "
 		  "an empty parameter name list declaration");
 	  break;
 	}
 
       if (c_type_promotes_to (type) != type)
 	{
-	  inform ("an argument type that has a default promotion can't match"
+	  inform ("an argument type that has a default promotion can't match "
 		  "an empty parameter name list declaration");
 	  break;
 	}


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