KDE/kdelibs/kjs

Peter Kümmel syntheticpp at gmx.net
Wed Feb 15 23:02:05 CET 2006


Darin Adler wrote:
> On Feb 15, 2006, at 1:40 PM, Peter Kümmel wrote:
> 
>> SVN commit 509934 by kuemmel:
>>
>> This is the apple comment: "Fix the build by applying a GCC- 
>> specific namespace hack."
>> also fix to build with msvc
>>
>> CCMAIL:khtml-devel at kde.org
>> CCMAIL:khtml-cvs at kde.org
>>
>>
>>
>>  M  +12 -3     lookup.h
>>
>>
>> --- trunk/KDE/kdelibs/kjs/lookup.h #509933:509934
>> @@ -294,9 +294,18 @@
>>   * If the prototype has a "parent prototype", e.g. DOMElementProto  
>> falls back on DOMNodeProto,
>>   * then the last line will use IMPLEMENT_PROTOTYPE_WITH_PARENT,  
>> with DOMNodeProto as last argument.
>>   */
>> +
>> +// Work around a bug in GCC 4.1
>> +// and in msvc
>> +#if !__GNUC__
>> +#define KJS_GCC_ROOT_NS_HACK ::
>> +#else
>> +#define KJS_GCC_ROOT_NS_HACK
>> +#endif
> 
> Actually, the bug is in GCC, and there's no MSVC bug. MSVC matches  
> the C++ standard here. that's why the JavaScriptCore does not mention  
> msvg here.
> 
>      -- Darin
> 

You mean, compiling
::cacheGlobalObject<ClassProto>(exec, *name());
but not
cacheGlobalObject<ClassProto>(exec, *name());
is standard conform?
What's the reason for this?

Peter


More information about the Khtml-devel mailing list