Re: doubled words
Mike Stump wrote: On Apr 10, 2011, at 2:07 PM, Jim Meyering wrote: $ git ls-files .|xargs perl -0777 -n -e 'while (/\b(it)\s+\1\b/gms)' -e '{$n=($` =~ tr/\n/\n/ + 1); ($v=$)=~s/\n/\\n/g; print $ARGV:$n:$v\n}'|grep -v ChangeLog gcc/config/cris/cris.opt:152:it it gcc/gensupport.c:1066:it\n it These are obvious to me, so I checked in fixes for them. Likewise for this: gcc/ada/gnat_ugn.texi:12636:it\nit From 9eeae941081b3d6a0dd2c7db2b4752a3f04b1541 Mon Sep 17 00:00:00 2001 From: Jim Meyering meyer...@redhat.com Date: Sat, 23 Apr 2011 08:47:04 +0200 Subject: [PATCH] * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/ --- gcc/ada/ChangeLog |4 gcc/ada/gnat_ugn.texi |2 +- 2 files changed, 5 insertions(+), 1 deletions(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 70df175..f6e705e 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,7 @@ +2011-04-23 Jim Meyering meyer...@redhat.com + + * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/ + 2011-04-22 Eric Botcazou ebotca...@adacore.com * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi index d843106..463662a 100644 --- a/gcc/ada/gnat_ugn.texi +++ b/gcc/ada/gnat_ugn.texi @@ -12634,7 +12634,7 @@ that is the entity @code{Main} is declared in main.ads, line 2, column 9, its body is in main.adb, line 1, column 14 and is not referenced any where. The entity @code{Print} is declared in bar.ads, line 2, column 15 and it -it referenced in main.adb, line 6 column 12 and line 7 column 12. +is referenced in main.adb, line 6 column 12 and line 7 column 12. @item gnatxref package1.adb package2.ads @code{gnatxref} will generates cross-reference information for -- 1.7.5.rc3.291.g63e4e
Re: doubled words
On Apr 10, 2011, at 4:54 AM, Jim Meyering wrote: I would be inclined to prepare a patch if I thought it would be applied (promptly?), but I submitted a clear/simple fix for an obvious double-free bug (albeit only in a test case) a month ago: http://patchwork.ozlabs.org/patch/85973/ avoid memory overrun in a test leading to potential double-free * testsuite/test-expandargv.c (writeout_test): Fix off-by-one error: i.e., do copy the trailing NUL byte. AFAIK, it hasn't been applied. If a real bug has such low priority, this is not a good time to submit a clean-up change. So, my recommendation would be to treat each patch by itself. I know how you feel. I've applied it as it was previous approved.
Re: doubled words
On Apr 10, 2011, at 4:54 AM, Jim Meyering wrote: I've noticed/fixed a few occurrences of doubled words like the the, I've fixed the obviously wrong ones in gcc/.* excluding ada and go. I don't hate Ada and go, since I don't pretend to keep up on rules to their parts of the tree. I did do java, but only gcc/java, as I think we still can put in obvious work there. One or more of the ones you listed were spurious, I didn't change those. I'm skipping everything not gcc/.*, as I don't keep up on the various rules. One disadvantage of having a multiplicity of rules. :-( Longer term, would be nice to remove some of the multiplicity of rules. I also re-flowed a few of these to make them prettier and fixed the English on a few. Thanks. Index: doc/tm.texi === --- doc/tm.texi (revision 172246) +++ doc/tm.texi (working copy) @@ -94,7 +94,7 @@ Similarly, there is a @code{targetcm} variable for hooks that are specific to front ends for C-family languages, documented as ``C Target Hook''. This is declared in @file{c-family/c-target.h}, the -the initializer @code{TARGETCM_INITIALIZER} in +initializer @code{TARGETCM_INITIALIZER} in @file{c-family/c-target-def.h}. If targets initialize @code{targetcm} themselves, they should set @code{target_has_targetcm=yes} in @file{config.gcc}; otherwise a default definition is used. @@ -2332,7 +2332,7 @@ certain operand, you should define a class @code{FLOAT_OR_GENERAL_REGS} which includes both of them. Otherwise you will get suboptimal code, or even internal compiler errors when reload cannot find a register in the -the class computed via @code{reg_class_subunion}. +class computed via @code{reg_class_subunion}. You must also specify certain redundant information about the register classes: for each class, which classes contain it and which ones are Index: doc/tm.texi.in === --- doc/tm.texi.in (revision 172246) +++ doc/tm.texi.in (working copy) @@ -94,7 +94,7 @@ Similarly, there is a @code{targetcm} variable for hooks that are specific to front ends for C-family languages, documented as ``C Target Hook''. This is declared in @file{c-family/c-target.h}, the -the initializer @code{TARGETCM_INITIALIZER} in +initializer @code{TARGETCM_INITIALIZER} in @file{c-family/c-target-def.h}. If targets initialize @code{targetcm} themselves, they should set @code{target_has_targetcm=yes} in @file{config.gcc}; otherwise a default definition is used. @@ -2322,7 +2322,7 @@ certain operand, you should define a class @code{FLOAT_OR_GENERAL_REGS} which includes both of them. Otherwise you will get suboptimal code, or even internal compiler errors when reload cannot find a register in the -the class computed via @code{reg_class_subunion}. +class computed via @code{reg_class_subunion}. You must also specify certain redundant information about the register classes: for each class, which classes contain it and which ones are Index: doc/invoke.texi === --- doc/invoke.texi (revision 172246) +++ doc/invoke.texi (working copy) @@ -7708,7 +7708,7 @@ This option enables the extraction of object files with GIMPLE bytecode out of library archives. This improves the quality of optimization by exposing more -code the the link time optimizer. This information specify what symbols +code the link time optimizer. This information specify what symbols can be accessed externally (by non-LTO object or during dynamic linking). Resulting code quality improvements on binaries (and shared libraries that do use hidden visibility) is similar to @code{-fwhole-program}. See Index: targhooks.c === --- targhooks.c (revision 172246) +++ targhooks.c (working copy) @@ -1189,9 +1189,10 @@ else if (!caller_opts) ret = false; - /* If both caller and callee have attributes, assume that if the pointer is - different, the the two functions have different target options since - build_target_option_node uses a hash table for the options. */ + /* If both caller and callee have attributes, assume that if the + pointer is different, the two functions have different target + options since build_target_option_node uses a hash table for the + options. */ else ret = (callee_opts == caller_opts); Index: regstat.c === --- regstat.c (revision 172246) +++ regstat.c (working copy) @@ -42,7 +42,7 @@ REG_N_SETS and REG_N_REFS. */ -/* If a pass need to change these values in some magical way or or the +/* If a pass need to change these values in some magical way or the pass needs to have accurate values for these and is not using
Re: doubled words
On Sun, 10 Apr 2011, Jim Meyering wrote: I would be inclined to prepare a patch if I thought it would be applied (promptly?), but I submitted a clear/simple fix for an obvious double-free bug (albeit only in a test case) a month ago: http://patchwork.ozlabs.org/patch/85973/ avoid memory overrun in a test leading to potential double-free * testsuite/test-expandargv.c (writeout_test): Fix off-by-one error: i.e., do copy the trailing NUL byte. AFAIK, it hasn't been applied. If a real bug has such low priority, this is not a good time to submit a clean-up change. Please ping unreviewed (or approved but not committed) patches at least weekly, as many times as needed. If a patch isn't reviewed within a week, it's unlikely to be reviewed without a ping. (Actually I suspect the vast bulk of reviews are within two or three days.) -- Joseph S. Myers jos...@codesourcery.com
Re: doubled words
On Sun, 10 Apr 2011, Jim Meyering wrote: boehm-gc/configure.host:5:the the boehm-gc/doc/README:123:to to boehm-gc/misc.c:212:to to boehm-gc/os_dep.c:4010:to to Maintained externally and the GCC copy is very out-of-date. Send patches to upstream boehm-gc instead. libdecnumber/decCommon.c:391:the the Maintained externally, though I'm not sure by whom. libffi/README:105:the the libffi/src/dlmalloc.c:103:if if libffi/src/dlmalloc.c:1616:the the libffi/src/dlmalloc.c:3436:or\n or Maintained externally at least to some extent (there is a separate master repository). libgo/config/ltmain.sh:570:and and libgo/go/go/printer/nodes.go:273:the the libgo/go/math/remainder.go:7:the the libgo/go/regexp/regexp.go:712:to to libgo/go/runtime/extern.go:23:the the libgo/go/tabwriter/tabwriter.go:582:the the Maintained externally. libiberty/regex.c:5434:the\n the Based on glibc, though I'm not sure this implementation is still used there and if it is I don't think we really merge from glibc as upstream. libjava/classpath/external/w3c_dom/org/w3c/dom/Document.java:263:the the All of Classpath is maintained externally. libstdc++-v3/doc/html/ext/lwg-closed.html:2966:the the libstdc++-v3/doc/html/ext/lwg-closed.html:7942:the the libstdc++-v3/doc/html/ext/lwg-closed.html:10676:the the libstdc++-v3/doc/html/ext/lwg-defects.html:4763:the the libstdc++-v3/doc/html/ext/lwg-defects.html:12751:the the libstdc++-v3/doc/html/ext/lwg-defects.html:13413:the the libstdc++-v3/doc/html/ext/lwg-defects.html:19629:the the libstdc++-v3/doc/html/ext/lwg-defects.html:24715:the the libstdc++-v3/doc/html/ext/lwg-defects.html:41449:the the libstdc++-v3/doc/html/ext/lwg-defects.html:46044:the the libstdc++-v3/doc/html/ext/lwg-defects.html:70907:the the libstdc++-v3/doc/html/ext/lwg-defects.html:72274:the the libstdc++-v3/doc/html/ext/lwg-defects.html:79177:the the Maintained externally. ltmain.sh:570:and and Maintained externally. zlib/contrib/asm586/README.586:8:the the zlib/contrib/minizip/unzip.c:407:the the zlib/contrib/minizip/zip.c:552:the the zlib/contrib/minizip/zip.h:154:the the zlib/contrib/minizip/zip.h:156:the the zlib/contrib/puff/puff.c:20:to to zlib/deflate.c:166:to to zlib/deflate.c:179:to to zlib/old/visual-basic.txt:118:the the Maintained externally. -- Joseph S. Myers jos...@codesourcery.com
Re: doubled words
Mike Stump wrote: On Apr 10, 2011, at 4:54 AM, Jim Meyering wrote: I've noticed/fixed a few occurrences of doubled words like the the, I've fixed the obviously wrong ones in gcc/.* excluding ada and go. I don't hate Ada and go, since I don't pretend to keep up on rules to their parts of the tree. I did do java, but only gcc/java, as I think we still can put in obvious work there. One or more of the ones you listed were spurious, I didn't change those. I'm skipping everything not gcc/.*, as I don't keep up on the various rules. One disadvantage of having a multiplicity of rules. :-( Longer term, would be nice to remove some of the multiplicity of rules. I also re-flowed a few of these to make them prettier and fixed the English on a few. Thanks for the quick work. I realized that I'd omitted a few short, common words and have added in, on, at and for. Running this revised command shows a few new ones, at least one is in a diagnostic, which means it shows up also in each of the .po files. git ls-files .|xargs perl -0777 -n \ -e 'while (/\b(then?|in|on|if|at|but|f?or|and|to)\s+\1\b/gms)' \ -e '{$n=($` =~ tr/\n/\n/ + 1); ($v=$)=~s/\n/\\n/g; print $ARGV:$n:$v\n}' Here are a few fixes: diff --git a/gcc/config/alpha/vms-unwind.h b/gcc/config/alpha/vms-unwind.h index ea2c3a3..71cb7b8 100644 --- a/gcc/config/alpha/vms-unwind.h +++ b/gcc/config/alpha/vms-unwind.h @@ -1,5 +1,5 @@ /* Fallback frame unwinding for Alpha/VMS. - Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2009, 2010 + Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2009, 2010, 2011 Free Software Foundation, Inc. This file is part of GCC. @@ -229,7 +229,7 @@ alpha_vms_fallback_frame_state (struct _Unwind_Context *context, /* If PV designates an exception dispatcher, we have to adjust the return address column to get at the signal occurrence point, and account for - for what the CHF context contains. */ + what the CHF context contains. */ if (DENOTES_EXC_DISPATCHER (pv)) { diff --git a/gcc/config/arm/unwind-arm.h b/gcc/config/arm/unwind-arm.h index a9ba126..1a51d8d 100644 --- a/gcc/config/arm/unwind-arm.h +++ b/gcc/config/arm/unwind-arm.h @@ -1,5 +1,5 @@ /* Header file for the ARM EABI unwinder - Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 + Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2011 Free Software Foundation, Inc. Contributed by Paul Brook @@ -65,7 +65,7 @@ extern C { } _Unwind_State; - /* Provided only for for compatibility with existing code. */ + /* Provided only for compatibility with existing code. */ typedef int _Unwind_Action; #define _UA_SEARCH_PHASE 1 #define _UA_CLEANUP_PHASE 2 diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c index 6ea5fa2..5796bc7 100644 --- a/gcc/config/microblaze/microblaze.c +++ b/gcc/config/microblaze/microblaze.c @@ -919,7 +919,7 @@ microblaze_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int *tot { /* Add 1 to make shift slightly more expensive than add. */ *total = COSTS_N_INSNS (INTVAL (XEXP (x, 1))) + 1; - /* Reduce shift costs for for special circumstances. */ + /* Reduce shift costs for special circumstances. */ if (optimize_size INTVAL (XEXP (x, 1)) 5) *total -= 2; if (!optimize_size INTVAL (XEXP (x, 1)) 17) diff --git a/gcc/config/sh/constraints.md b/gcc/config/sh/constraints.md index 6b0e5d2..40d0d0b 100644 --- a/gcc/config/sh/constraints.md +++ b/gcc/config/sh/constraints.md @@ -1,5 +1,5 @@ ;; Constraint definitions for Renesas / SuperH SH. -;; Copyright (C) 2007, 2008 Free Software Foundation, Inc. +;; Copyright (C) 2007, 2008, 2011 Free Software Foundation, Inc. ;; ;; This file is part of GCC. ;; @@ -99,7 +99,7 @@ (match_test ival = -128 ival = 127))) (define_constraint I10 - A signed 10-bit constant, as used in in SHmedia andi, ori. + A signed 10-bit constant, as used in SHmedia andi, ori. (and (match_code const_int) (match_test ival = -512 ival = 511))) diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 86274e9..e055d7d 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -13979,7 +13979,7 @@ type_unification_real (tree tparms, gcc_assert (ntparms 0); /* Reset the number of non-defaulted template arguments contained - in in TARGS. */ + in TARGS. */ NON_DEFAULT_TEMPLATE_ARGS_COUNT (targs) = NULL_TREE; switch (strict) diff --git a/gcc/go/gofrontend/backend.h b/gcc/go/gofrontend/backend.h index 01f3cfa..d112d1f 100644 --- a/gcc/go/gofrontend/backend.h +++ b/gcc/go/gofrontend/backend.h @@ -148,7 +148,7 @@ class Backend // Create a new label. NAME will be empty if this is a label // created by the frontend for a loop construct. The location is - // where the the label is defined. + // where the label is defined. virtual Blabel*
Re: doubled words
Mike Stump wrote: On Apr 10, 2011, at 4:54 AM, Jim Meyering wrote: I've noticed/fixed a few occurrences of doubled words like the the, to to I fixed all the non-surious matches in the gcc/testsuite. if if in the fortran testsuite was the major spurious match. Thanks. Thanks. Yet more: an and it. At least the first one in the .texi file is legit. $ git ls-files .|xargs perl -0777 -n -e 'while (/\b(it)\s+\1\b/gms)' -e '{$n=($` =~ tr/\n/\n/ + 1); ($v=$)=~s/\n/\\n/g; print $ARGV:$n:$v\n}'|grep -v ChangeLog gcc/ada/gnat_ugn.texi:12636:it\nit gcc/config/cris/cris.opt:152:it it gcc/gensupport.c:1066:it\n it gcc/testsuite/ada/acats/tests/cxg/cxg2014.a:263:it it libiberty/regex.c:4085:it\n it libjava/classpath/java/io/ByteArrayOutputStream.java:61:it it libjava/classpath/java/io/CharArrayWriter.java:58:it it libjava/classpath/org/omg/CORBA_2_3/portable/OutputStream.java:75:it it libstdc++-v3/doc/html/ext/lwg-defects.html:9102:it it libstdc++-v3/testsuite/data/thirty_years_among_the_dead_preproc.txt:73079:it\nit libstdc++-v3/testsuite/data/thirty_years_among_the_dead_preproc.txt:171737:it\nit $ git ls-files .|xargs perl -0777 -n -e 'while (/\b(an)\s+\1\b/gms)' -e '{$n=($` =~ tr/\n/\n/ + 1); ($v=$)=~s/\n/\\n/g; print $ARGV:$n:$v\n}'|grep -v ChangeLog gcc/fortran/frontend-passes.c:213:an an libffi/src/dlmalloc.c:1822:an an libjava/classpath/gnu/CORBA/CDR/AbstractCdrOutput.java:877:an an libjava/classpath/gnu/javax/crypto/jce/params/BlockCipherParameters.java:78:an an libjava/classpath/org/omg/CORBA/CompletionStatusHelper.java:93:an an