On Sun, Jul 21, 2013 at 04:32:04PM +0200, Ondřej Bílka wrote:
> Hi,
> 
> This is series of typo fixing patches. They are generated with stylepp
> https://github.com/neleai/stylepp
> which makes patch generation very effective.
> 
> This series should be applied in sequence to avoid reviewing duplicates.
> 
> Now I exclude those directories that are upstream, see file
> https://github.com/neleai/stylepp/blob/master/maintained/gcc/ignore
> and if you want ignore additional files/directories add them to this
> file.
> 
> Now for patch itself, situation is following:
> I extracted 4214 common corrections from wikipedia, in following list:
> https://github.com/neleai/stylepp/blob/master/maintained/dictionary_wiki
> I plan to add another replacements that we will frequently encounter.
> 
> There is possibility to generate this list automatically from commit
> history, If we look when in comment commit changes word but not two
> adjacent words and aspell list says that changed word went from wrong to 
> correct it is  likely a typo fix. We could extract these
> replacement pairs and use them. I would gladly welcome somebody to
> volunteer to write this analysis.
> 
> Then I ran script/stylepp_fix_spell which produced following 300kb patch:
> 
> http://kam.mff.cuni.cz/~ondra/0001-Fix-common-typos.patch

A few comments:

diff --git a/gcc/ada/gcc-interface/utils2.c b/gcc/ada/gcc-interface/utils2.c
index 3f39a43..7f7f6af 100644
--- a/gcc/ada/gcc-interface/utils2.c
+++ b/gcc/ada/gcc-interface/utils2.c
@@ -1902,7 +1902,7 @@ build_simple_component_ref (tree record_variable, tree 
component,
     {
       tree new_field;
 
-      /* First loop thru normal components.  */
+      /* First loop through normal components.  */

"thru" is not a typo.

 
-     then all auto increment forms are ok.  */
+     then all auto increment forms are OK.  */
 
The patch would be much smaller if we'd keep "ok"s.

diff --git a/gcc/config/tilepro/tilepro.c b/gcc/config/tilepro/tilepro.c
index 59618e4..1d9adbd 100644
--- a/gcc/config/tilepro/tilepro.c
+++ b/gcc/config/tilepro/tilepro.c
@@ -1365,7 +1365,7 @@ expand_set_cint32 (rtx dest_reg, rtx src_val)
                                      three_wide_only))
        {
          /* 0xFFFFA500 becomes:
-            movei temp, 0xFFFFFFA5
+            movie temp, 0xFFFFFFA5

That doesn't seem to be correct.

             shli dest, temp, 8  */
          emit_move_insn (dest_reg,
                          gen_rtx_ASHIFT (SImode, temp,
@@ -1377,7 +1377,7 @@ expand_set_cint32 (rtx dest_reg, rtx src_val)
                                      three_wide_only))
        {
          /* 0x7FFFFFFF becomes:
-            movei temp, -2
+            movie temp, -2

Likewise.

             shri dest, temp, 1  */
          emit_move_insn (dest_reg,
                          gen_rtx_LSHIFTRT (SImode, temp,
@@ -1393,7 +1393,7 @@ expand_set_cint32 (rtx dest_reg, rtx src_val)
          if (expand_set_cint32_one_inst (temp, r, three_wide_only))
            {
              /* 0xFFA5FFFF becomes:
-                movei temp, 0xFFFFFFA5
+                movie temp, 0xFFFFFFA5

Likewise.

                 rli dest, temp, 16  */
              emit_move_insn (dest_reg,
                              gen_rtx_ROTATE (SImode, temp, GEN_INT (count)));
diff --git a/gcc/ipa.c b/gcc/ipa.c
index 7c0d495..d44cf38 100644
--- a/gcc/ipa.c
+++ b/gcc/ipa.c
@@ -548,7 +548,7 @@ static bool
 comdat_can_be_unshared_p_1 (symtab_node node)
 {
   /* When address is taken, we don't know if equality comparison won't
-     break eventaully. Exception are virutal functions and vtables, where
+     break eventaully. Exception are virtual functions and vtables, where

"eventually"

diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 2787d67..b0dad7d 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,64 @@
+2013-07-21   Ondřej Bílka  <nel...@seznam.cz>
+
+       * c-c++-common/pr41779.c: Fix typos.
+       * c-c++-common/raw-string-13.c: Likewise.
+       * c-c++-common/raw-string-14.c: Likewise.
+       * c-c++-common/raw-string-15.c: Likewise.
+       * c-c++-common/raw-string-16.c: Likewise.
+       * c-c++-common/raw-string-2.c: Likewise.
+       * ChangeLog: Likewise.

ChangeLog in a ChangeLog?

diff --git a/gcc/testsuite/c-c++-common/pr41779.c 
b/gcc/testsuite/c-c++-common/pr41779.c
index 80c8e6b..f80412c 100644
--- a/gcc/testsuite/c-c++-common/pr41779.c
+++ b/gcc/testsuite/c-c++-common/pr41779.c
@@ -1,4 +1,4 @@
-/* PR41779: Wconversion cannot see throught real*integer promotions. */
+/* PR41779: Wconversion cannot see thought real*integer promotions. */

This change is not ok (eh, OK), it should've been "through".

diff --git a/libiberty/regex.c b/libiberty/regex.c
index 17091ce..8a2dd41 100644
--- a/libiberty/regex.c
+++ b/libiberty/regex.c
@@ -3396,7 +3396,7 @@ PREFIX(regex_compile) (const char *ARG_PREFIX(pattern),
                               class.  */
                            PATFETCH (c);
 
-                           /* Now we have to go throught the whole table
+                           /* Now we have to go thought the whole table


Again, throught -> through.

diff --git a/libsanitizer/ChangeLog b/libsanitizer/ChangeLog
index d2c80b3..a6c7d5f 100644
--- a/libsanitizer/ChangeLog
+++ b/libsanitizer/ChangeLog
@@ -1,3 +1,7 @@
+2013-07-21   Ondřej Bílka  <nel...@seznam.cz>
+
+       * tsan/tsan_interface_atomic.cc: Fix typos.

I don't think we should make changes to libsanitizer/*.

diff --git a/libstdc++-v3/testsuite/ext/pb_ds/example/hash_resize.cc 
b/libstdc++-v3/testsuite/ext/pb_ds/example/hash_resize.cc
index 1afb9b9..a5e026e 100644
--- a/libstdc++-v3/testsuite/ext/pb_ds/example/hash_resize.cc
+++ b/libstdc++-v3/testsuite/ext/pb_ds/example/hash_resize.cc
@@ -36,7 +36,7 @@
 
 /**
  * This example shows how to externally manipulate the size of a hash-based
- * container object throught its resize-policy object.
+ * container object thought its resize-policy object.

Again, throught -> through.

        Marek

Reply via email to