Re: [PATCH] improve hack in src/base/TextException.h

From: Alex Rousskov <rousskov_at_measurement-factory.com>
Date: Sun, 20 Feb 2011 20:40:50 -0700

On 02/18/2011 05:43 PM, Amos Jeffries wrote:
> On 19/02/11 11:25, Alex Rousskov wrote:
>> On 01/31/2011 07:17 AM, Kinkie wrote:
>>> TextException.h includes an hack to avoid the compiler noticing that
>>> there are multiple instances of FileNameHashCached() in the compiled
>>> binary.
>>> Intel's icc doesn't like the way it is implemented, and instead of
>>> trying to figure out how to have it stop complaining, I propose to use
>>> a specific-purpose gcc construct, as done in this patch. Thoughts?
>>> Votes?
>>
>> What does icc complain about? Kind of hard to agree to add more crap
>> without seeing what the real problem that needs fixing is...
>>
>> Alex.
>
> Current trunk with the patch reverted fails on ICC showing:
>
> ../../../src/base/TextException.h(66): error #42: operand types are
> incompatible ("void *" and "unsigned int (*)(const char *)")
> bool use(void *ptr=(__null)) { return ptr != &FileNameHashCached;}
>
>
> With a marker pointing at the != comparison.

Looks like casting &FileNameHashCached to (void*) would fix this.

> If you have any alternative fix ideas the 3.ALPHA-patch job in hudson
> works. You just have to include reversal of the rev11236 change since it
> has already been committed.

Sorry, I am not sure I understand the above. Should I reverse r11236 and
commit a casting fix? Or do you want be to post a patch that some Hudson
job will pick up and test somehow first?

Thank you,

Alex.
Received on Mon Feb 21 2011 - 03:41:01 MST

This archive was generated by hypermail 2.2.0 : Mon Feb 21 2011 - 12:00:04 MST