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]

Fix exgettext Warn handling


My exgettext changes in 
<http://gcc.gnu.org/ml/gcc-patches/2010-09/msg00107.html> caused .opt 
lines marked Warning to be wrongly extracted into gcc.pot as if they had 
Warn() for options whose use should be diagnosed.  I've committed this 
patch to fix this; tested by regenerating gcc.pot.

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 165823)
+++ ChangeLog	(working copy)
@@ -1,3 +1,7 @@
+2010-10-22  Joseph Myers  <joseph@codesourcery.com>
+
+	* exgettext: Only handle Warn when followed by '('.
+
 2010-10-13  Joseph Myers  <joseph@codesourcery.com>
 
 	* vi.po: Update.
Index: exgettext
===================================================================
--- exgettext	(revision 165823)
+++ exgettext	(working copy)
@@ -234,7 +234,7 @@
 		printf("#line %d \"%s\"\n", lineno, file)
 		printf("_(\"%s\")\n", line)
 	    }
-	    if ((field == 1) && /Warn/) {
+	    if ((field == 1) && /Warn\(/) {
 		line = $0
 		sub(".*Warn\\(", "", line)
 		if (line ~ "^{") {

-- 
Joseph S. Myers
joseph@codesourcery.com


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