Last Comment Bug 497838 - AIX Compilation error for 3.6a1pre source xpcom/io/nsWildCard.cpp", line 215.28: 1540-0274 (S) The name lookup for "_shexp_match" did not find a declaration
: AIX Compilation error for 3.6a1pre source xpcom/io/nsWildCard.cpp", line 215....
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: XPCOM (show other bugs)
: Trunk
: Other AIX
: -- major (vote)
: mozilla1.9.2a1
Assigned To: Shailen
:
Mentors:
Depends on:
Blocks: 524271
  Show dependency treegraph
 
Reported: 2009-06-12 03:17 PDT by Shailen
Modified: 2009-10-27 01:10 PDT (History)
5 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch V 1 (4.21 KB, patch)
2009-06-12 03:36 PDT, Shailen
benjamin: review+
Details | Diff | Splinter Review

Description Shailen 2009-06-12 03:17:14 PDT
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10

"/home/guest/sb/mercurial/src/xpcom/io/nsWildCard.cpp", line 215.28: 1540-0274 (S) The name lookup for "_shexp_match" did not find a declaration.
"/home/guest/sb/mercurial/src/xpcom/io/nsWildCard.cpp", line 215.28: 1540-1292 (I) Static declarations are not considered for a function call if the function is not qualified.
"/home/guest/sb/mercurial/src/xpcom/io/nsWildCard.cpp", line 193.1: 1540-0700 (I) The previous message was produced while processing "_shexp_match<unsigned short>(const unsigned short *, const unsigned short *, PRBool)".
"/home/guest/sb/mercurial/src/xpcom/io/nsWildCard.cpp", line 310.8: 1540-0700 (I) The previous message was produced while processing "NS_WildCardMatch_<unsigned short>(const unsigned short *, const unsigned short *, PRBool)".
"/home/guest/sb/mercurial/src/xpcom/io/nsWildCard.cpp", line 331.12: 1540-0700 (I) The previous message was produced while processing "NS_WildCardMatch(const PRUnichar *, const PRUnichar *, PRBool)".
"/home/guest/sb/mercurial/src/xpcom/io/nsWildCard.cpp", line 215.28: 1540-0274 (S) The name lookup for "_shexp_match" did not find a declaration.
"/home/guest/sb/mercurial/src/xpcom/io/nsWildCard.cpp", line 215.28: 1540-1292 (I) Static declarations are not considered for a function call if the function is not qualified.
"/home/guest/sb/mercurial/src/xpcom/io/nsWildCard.cpp", line 193.1: 1540-0700 (I) The previous message was produced while processing "_shexp_match<char>(const char *, const char *, PRBool)".
"/home/guest/sb/mercurial/src/xpcom/io/nsWildCard.cpp", line 310.8: 1540-0700 (I) The previous message was produced while processing "NS_WildCardMatch_<char>(const char *, const char *, PRBool)".
"/home/guest/sb/mercurial/src/xpcom/io/nsWildCard.cpp", line 324.12: 1540-0700 (I) The previous message was produced while processing "NS_WildCardMatch(const char *, const char *, PRBool)".


Reproducible: Always

Steps to Reproduce:
1. Build Mozilla Firefox 3.6a1pre build on AIX with Gnome RPMS of 64 bit
version.
2.
3.
Actual Results:  
Build fails with the above error.


Expected Results:  
No build failure
Comment 1 Shailen 2009-06-12 03:36:36 PDT
Created attachment 382939 [details] [diff] [review]
Patch V 1

I checked with compiler team for this issue and below is the explanation I received for the compiler behaviour.

' In the C++ Standard (ISO/IEC 14882), section 14.6.4.2 "Candidate functions" describes that: for an unqualified function call that depends on a template parameter, only function declarations with external linkage from the template definition context should be found. 

 In this scenario the "static" function results in internal linkage and therefore cannot be found. 

One solution is to make the function non-static by removing "static".

Alternatively we may make the function-call qualified. ' 

The patch submitted has taken alternate approach of making the function-call qualified.
Comment 2 Benjamin Smedberg [:bsmedberg] 2009-06-12 09:44:59 PDT
Comment on attachment 382939 [details] [diff] [review]
Patch V 1

That's a really amazing rule I hadn't heard about before!
Comment 3 Reed Loden [:reed] (use needinfo?) 2009-06-14 01:42:35 PDT
http://hg.mozilla.org/mozilla-central/rev/c2e179151f9c

Note You need to log in before you can comment on or make changes to this bug.