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: [pph] Support for references to symbols in other PPH images (issue4873051)


On 08/16/2011 02:04 PM, Gabriel Charette wrote:

Setting *cache_ix to (unsigned) -1 used to be a "hack" (with a comment
explaining it which was removed just below), to avoid a warning about
it being unset in a branch, but that branch was only PPH_RECORD_END,
in which case it didn't matter.

Yeah, I remember, but I set them to -1 now as an actual return value now.


Now that we actually check in pph_cache_get that include_ix ==
(unsigned) -1, I'm not so sure this is good... while (unsigned) -1 is
a very large unsigned int, it's not impossible to have an actual cache
entry with that number...

Oh, no. If we ever need 4B entries in the cache, we will die much sooner than this.


@@ -457,13 +478,13 @@ pph_in_cxx_binding_1 (pph_stream *stream)
   cxx_binding *cb;
   tree value, type;
   enum pph_record_marker marker;
-  unsigned ix;
+  unsigned ix, include_ix;

Sometimes you call the local variable "include_ix"...


@@ -505,13 +526,13 @@ pph_in_class_binding (pph_stream *stream)
  {
   cp_class_binding *cb;
   enum pph_record_marker marker;
-  unsigned ix;
+  unsigned image_ix, ix;

... and sometimes image_ix: consistency would be nice, although not necessary...

Thanks, I'll fix. I'm horribly inconsistent with naming schemes (blame my evil twin).



Diego.



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