All users were logged out of Bugzilla on October 13th, 2018

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

RESOLVED FIXED

Status

()

RESOLVED FIXED
10 years ago
9 years ago

People

(Reporter: andrew, Assigned: andrew)

Tracking

Trunk
Sun
Solaris
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: fixed-in-tracemonkey)

Attachments

(1 attachment, 2 obsolete attachments)

(Assignee)

Description

10 years ago
Created attachment 370987 [details] [diff] [review]
patch to move anonymous func ptr to typedef

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)
(Assignee)

Comment 1

10 years ago
Created attachment 370988 [details] [diff] [review]
patch to move anonymous func ptr to typedef

removed accidental extra newline in the previous patch
Attachment #370987 - Attachment is obsolete: true
Attachment #370988 - Flags: review?(brendan)
Attachment #370987 - Flags: review?(brendan)

Updated

10 years ago
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
(Assignee)

Comment 3

10 years ago
Created attachment 370989 [details] [diff] [review]
patch to move anonymous func ptr to typedef

updated patch for review nit
Attachment #370988 - Attachment is obsolete: true
Attachment #370989 - Flags: review+
(Assignee)

Updated

10 years ago
Keywords: checkin-needed

Comment 4

10 years ago
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.

Comment 7

9 years ago
https://hg.mozilla.org/tracemonkey/rev/987d2e3f7ca3
Keywords: checkin-needed
Whiteboard: [c-n: tracemonkey] → fixed-in-tracemonkey

Comment 8

9 years ago
http://hg.mozilla.org/mozilla-central/rev/987d2e3f7ca3
Status: ASSIGNED → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.