Patchwork Fix exgettext Warn handling

login
register
mail settings
Submitter Joseph S. Myers
Date Oct. 22, 2010, 3 p.m.
Message ID <Pine.LNX.4.64.1010221458400.24275@digraph.polyomino.org.uk>
Download mbox | patch
Permalink /patch/68870/
State New
Headers show

Comments

Joseph S. Myers - Oct. 22, 2010, 3 p.m.
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.

Patch

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 ~ "^{") {