Closed Bug 1030599 Opened 5 years ago Closed 5 years ago

Architecture-x64.h:244:13: warning: 'bool js::jit::hasUnaliasedDouble()' defined but not used [-Wunused-function] (same for hasMultiAlias(),

Categories

(Core :: JavaScript Engine: JIT, defect)

x86_64
Linux
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla33

People

(Reporter: dholbert, Assigned: bbouvier)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

In current mozilla-central, GCC is giving me instances of this warning for each .cpp file that #includes Architecture-x64.h (directly or indirectly) and does not use the function in question:
{
 0:47.42 In file included from /scratch/work/builds/mozilla-central/mozilla-central.12-12-07.08-38/mozilla/js/src/jit/Registers.h:16:0,
 0:47.42                  from /scratch/work/builds/mozilla-central/mozilla-central.12-12-07.08-38/mozilla/js/src/jit/Snapshots.h:17,
 0:47.42                  from /scratch/work/builds/mozilla-central/mozilla-central.12-12-07.08-38/mozilla/js/src/jit/JitFrameIterator.h:17,
 0:47.42                  from /scratch/work/builds/mozilla-central/mozilla-central.12-12-07.08-38/mozilla/js/src/vm/Stack.h:16,
 0:47.42                  from /scratch/work/builds/mozilla-central/mozilla-central.12-12-07.08-38/mozilla/js/src/vm/Runtime.h:41,
 0:47.42                  from /scratch/work/builds/mozilla-central/mozilla-central.12-12-07.08-38/mozilla/js/src/jscntxt.h:15,
 0:47.42                  from /scratch/work/builds/mozilla-central/mozilla-central.12-12-07.08-38/mozilla/js/src/frontend/TokenStream.h:19,
 0:47.42                  from /scratch/work/builds/mozilla-central/mozilla-central.12-12-07.08-38/mozilla/js/src/frontend/ParseNode.h:12,
 0:47.42                  from /scratch/work/builds/mozilla-central/mozilla-central.12-12-07.08-38/mozilla/js/src/frontend/FullParseHandler.h:12,
 0:47.42                  from /scratch/work/builds/mozilla-central/mozilla-central.12-12-07.08-38/mozilla/js/src/frontend/Parser.h:17,
 0:47.44                  from /scratch/work/builds/mozilla-central/mozilla-central.12-12-07.08-38/mozilla/js/src/frontend/Parser-inl.h:10,
 0:47.44                  from /scratch/work/builds/mozilla-central/mozilla-central.12-12-07.08-38/mozilla/js/src/frontend/Parser.cpp:20:
 0:47.44 Warning: -Wunused-function in /scratch/work/builds/mozilla-central/mozilla-central.12-12-07.08-38/mozilla/js/src/jit/x64/Architecture-x64.h: 'bool js::jit::hasUnaliasedDouble()' defined but not used
 0:47.45 /scratch/work/builds/mozilla-central/mozilla-central.12-12-07.08-38/mozilla/js/src/jit/x64/Architecture-x64.h:244:13: warning: 'bool js::jit::hasUnaliasedDouble()' defined but not used [-Wunused-function]
 0:47.45  static bool hasUnaliasedDouble() {
 0:47.45              ^
 0:47.45 Warning: -Wunused-function in /scratch/work/builds/mozilla-central/mozilla-central.12-12-07.08-38/mozilla/js/src/jit/x64/Architecture-x64.h: 'bool js::jit::hasMultiAlias()' defined but not used
 0:47.46 /scratch/work/builds/mozilla-central/mozilla-central.12-12-07.08-38/mozilla/js/src/jit/x64/Architecture-x64.h:249:13: warning: 'bool js::jit::hasMultiAlias()' defined but not used [-Wunused-function]
 0:47.46  static bool hasMultiAlias() {
 0:47.46              ^


These functions were added in bug 991153, which landed today.

Marty, is there a reason these need to be declared as "static" (note that they're defined in .h files)?  If we drop that keyword (maybe replacing it with 'inline'), I think this problem will go away.
Flags: needinfo?(mrosenberg)
Attached patch bug1030599.patchSplinter Review
Indeed (not having inline => multiple definitions, and that doesn't seem enough to introduce Architecture-x{64,86}.cpp).
Assignee: nobody → benj
Status: NEW → ASSIGNED
Attachment #8446408 - Flags: review?(mrosenberg)
Flags: needinfo?(mrosenberg)
Attachment #8446408 - Flags: review?(mrosenberg) → review+
https://hg.mozilla.org/mozilla-central/rev/4dee0c59ee64
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
You need to log in before you can comment on or make changes to this bug.