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]

[PATCH] Tweak text of error message


I spent what I consider an inordinate amount of time figuring out that
it wasn't the option that gcc was complaining about, it was the argument
I had passed.  Both error conditions use the same text in their message.
This tweaks the second case to be more specific.

I'm running the testsuite just in case something in there checks for this
particular text.  Okay for mainline if it passes?


2003-04-25  Phil Edwards  <pme at gcc dot gnu dot org>

	* toplev.c (read_integral_parameter):  Use "argument" in error
	message to distinguish it from actual invalid options.


Index: toplev.c
===================================================================
RCS file: /home/pme/Repositories/GCC/gcc/gcc/toplev.c,v
retrieving revision 1.744
diff -u -3 -p -r1.744 toplev.c
--- toplev.c	24 Apr 2003 04:32:58 -0000	1.744
+++ toplev.c	26 Apr 2003 00:00:36 -0000
@@ -1673,7 +1673,7 @@ read_integral_parameter (p, pname, defva
   if (*endp != 0)
     {
       if (pname != 0)
-	error ("invalid option `%s'", pname);
+	error ("invalid option argument `%s'", pname);
       return defval;
     }
 


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