Closed Bug 587103 Opened 10 years ago Closed 9 years ago
AIX: 6 source files fail to compile in xl
C due to template/static inline scoping
TypedArrayTemplate is (obviously) a template, and it is referencing INT_TO_JSVAL, a static inline function, without prefixing it with "::". This breaks xlC because it can not resolve INT_TO_JSVAL. The standard does not require that statics be considered if the unqualified name is not found in the context of the template arguments. g++ does this fallback, xlC does not.
Example error: "jstypedarray.cpp", line 545.19: 1540-0274 (S) The name lookup for "INT_TO_JSVAL" did not find a declaration. "jstypedarray.cpp", line 545.19: 1540-1292 (I) Static declarations are not considered for a function call if the function is not qualified.
Refreshing this bug, as the existing patch is for a much older version. Back then, only this file failed. Now I have a new patch against trunk which fixes this same exact issue now present in the following files: +++ b/js/src/jsclone.cpp Wed Dec 22 16:59:11 2010 -0500 +++ b/js/src/jsgc.cpp Wed Dec 22 16:59:11 2010 -0500 +++ b/js/src/jsgcinlines.h Wed Dec 22 16:59:11 2010 -0500 +++ b/js/src/jsiter.cpp Wed Dec 22 16:59:11 2010 -0500 +++ b/js/src/jstypedarray.cpp Wed Dec 22 16:59:11 2010 -0500 +++ b/js/src/v8-dtoa/checks.h Wed Dec 22 16:59:11 2010 -0500
Summary: jstypedarray.cpp fails to compile under AIX/xlC due to template/static inline scoping → AIX: 6 source files fail to compile in xlC due to template/static inline scoping
Comment on attachment 499380 [details] [diff] [review] Properly scope external calls in templated functions r+ before a?, please
Attachment #499380 - Flags: approval2.0? → approval2.0-
Attachment #499380 - Flags: review?(mrbkap) → review+
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.