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]

Re: [doc, committed] fix typos in docs/comments for devirtualization optimizations


On 02/06/2015 06:19 PM, Gerald Pfeifer wrote:
Hi Sandra,

Index: gcc/ipa-devirt.c
===================================================================
      polymorphic (indirect) call
-       This is callgraph represention of virtual method call.  Every
+       This is callgraph representation of virtual method call.  Every
        polymorphic call contains otr_type and otr_token taken from
        original OBJ_TYPE_REF at callgraph construction time.

aren't some articles missing here?  "a callgraph representation
of a virtual method call"?

Yes. (FWIW, Slavic languages don't have either definite or indefinite articles, and I've noticed that people who are native speakers of those languages often omit them in English as well.... in user documentation I'd fix that but I'm less motivated to do it in code comments where the sense is clear otherwise.)

The other changes you suggest look fine to me, except this one:

   for (i = 0; BINFO_BASE_ITERATE (binfo, i, base_binfo); i++)
-    /* Walking bases that have no virtual method is pointless
excercise.  */
+    /* Walking bases that have no virtual method is pointless
exercise.  */
     if (polymorphic_type_binfo_p (base_binfo))

Shouldn't this just read "Walk bases..."?

No, "Walking" is a noun here.

I will be making and committing those changes, but would prefer
your second pair of eyes given that you have touched this recently.

-Sandra


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