Closed
Bug 444846
Opened 16 years ago
Closed 16 years ago
SM: Fixing GCC warning about redefined HAVE_VA_LIST_AS_ARRAY
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: igor, Assigned: igor)
References
Details
Attachments
(1 file, 1 obsolete file)
1.52 KB,
patch
|
crowderbt
:
review+
|
Details | Diff | Splinter Review |
+++ This bug was initially created as a clone of Bug #436263 +++ Currently on Linux-x64 during FireFox build the compiler generates for each SpiderMonkey source file: ./jsautocfg.h:54:1: warning: "HAVE_VA_LIST_AS_ARRAY" redefined In file included from <command line>:1: ./../../mozilla-config.h:63:1: warning: this is the location of the previous definition , The reason for this is that mozilla-config.h also defines the macro on Linux x64. To avoid this clash I suggest to rename HAVE_VA_LIST_AS_ARRAY into JS_HAVE_VA_LIST_AS_ARRAY
Comment 1•16 years ago
|
||
Is there a reason we can't simply not define it, if it already exists?
Assignee | ||
Comment 2•16 years ago
|
||
Renaming the bug to reflect the problem, not one among many possible solutions.
Summary: SM: Renaming HAVE_VA_LIST_AS_ARRAY into JS_HAVE_VA_LIST_AS_ARRAY → SM: Fixing GCC warning about redefined HAVE_VA_LIST_AS_ARRAY
Assignee | ||
Comment 3•16 years ago
|
||
The patch delegates to mozilla-config.h the task of defining HAVE_VA_LIST_AS_ARRAY under Mozilla's build.
Attachment #330098 -
Flags: review?
Comment 4•16 years ago
|
||
Comment on attachment 330098 [details] [diff] [review] v1 Grabbing the r?, since you didn't specify. This looks good to me.
Attachment #330098 -
Flags: review? → review+
Comment 5•16 years ago
|
||
Though, a perhaps less mozilla-centric view might be to do: + printf("#ifndef HAVE_VA_LIST_AS_ARRAY\n"); .... and so on.... instead.
Assignee | ||
Comment 6•16 years ago
|
||
The warning happens because mozilla-config.h and jsautocfg.h define the macro differently: #define HAVE_VA_LIST_AS_ARRAY 1 versus #define HAVE_VA_LIST_AS_ARRAY So the patch simply makes jsautocfg.h to use the same form as mozilla-config.h.
Attachment #330098 -
Attachment is obsolete: true
Attachment #330127 -
Flags: review?
Comment 7•16 years ago
|
||
Comment on attachment 330127 [details] [diff] [review] avoiding mozilla-config special casing Also works for me, but I still don't understand why we don't just test #ifndef HAVE_VA_LIST_AS_ARRAY, so that this breakage doesn't happen if/when the external definition changes later.
Attachment #330127 -
Flags: review? → review+
Assignee | ||
Comment 8•16 years ago
|
||
(In reply to comment #7) > (From update of attachment 330127 [details] [diff] [review]) > Also works for me, but I still don't understand why we don't just test #ifndef > HAVE_VA_LIST_AS_ARRAY, so that this breakage doesn't happen if/when the > external definition changes later. HAVE_VA_LIST_AS_ARRAY should have the same meaning when used. Having the same definition helps to check for that and make sure that if somebody defines mistakenly HAVE_VA_LIST_AS_ARRAY as 0, he would get an early warning.
Assignee | ||
Comment 9•16 years ago
|
||
I pushed the fix: http://hg.mozilla.org/mozilla-central/index.cgi/rev/60245c8c0ff3
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Updated•16 years ago
|
Flags: in-testsuite-
Flags: in-litmus-
You need to log in
before you can comment on or make changes to this bug.
Description
•