Closed Bug 486779 Opened 15 years ago Closed 15 years ago

jsscan: move anonymous function pointer to typdef to silence sunpro cc

Categories

(Core :: JavaScript Engine, defect)

Sun
Solaris
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: andrew, Assigned: andrew)

Details

(Whiteboard: fixed-in-tracemonkey)

Attachments

(1 file, 2 obsolete files)

SunPro CC compiler will complain about the anonymous mapfun function pointer because the function declaration is inside of an extern "C" block. Simply moving it out to a typedef shuts up the compiler:

"jsscan.cpp", line 147: Warning: function void(void(*)(const char*)) overloads extern "C" void(extern "C" void(*)(const char*)) because of different language linkages.

Patch creates a JSMapKeywordsFun typedef to silence the warning.
Attachment #370987 - Flags: review?(brendan)
removed accidental extra newline in the previous patch
Attachment #370987 - Attachment is obsolete: true
Attachment #370988 - Flags: review?(brendan)
Attachment #370987 - Flags: review?(brendan)
Attachment #370988 - Flags: review?(brendan) → review+
Comment on attachment 370988 [details] [diff] [review]
patch to move anonymous func ptr to typedef

>+typedef void (*JSMapKeywordsFun)(const char *);

Nit: function maps one keyword at a time, so the name should use Keyword, singular.

I think we should get rid of this old friend API, but for this bug, with the above fix, r=me.

/be
updated patch for review nit
Attachment #370988 - Attachment is obsolete: true
Attachment #370989 - Flags: review+
Keywords: checkin-needed
This should go into tracemonkey, not directly m-c
Assignee: general → andrew
Could you guys please take care of your TM landings? They tend to get dusty in the checkin-needed queue.
Whiteboard: [c-n: tracemonkey first]
Version: unspecified → Trunk
Whiteboard: [c-n: tracemonkey first] → [c-n: tracemonkey]
Status: NEW → ASSIGNED
Land it or wontfix it: it's grotesque that the tracemonkey checkin-needed queue is eight months long.
https://hg.mozilla.org/tracemonkey/rev/987d2e3f7ca3
Keywords: checkin-needed
Whiteboard: [c-n: tracemonkey] → fixed-in-tracemonkey
http://hg.mozilla.org/mozilla-central/rev/987d2e3f7ca3
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: