js/src/jsinfer.cpp:581:14: warning: ‘js::types::CompilerConstraintList’ has a field ‘js::types::CompilerConstraintList::constraints’ whose type uses the anonymous namespace [enabled by default], and similar in jsopcode.cpp

RESOLVED FIXED in mozilla28

Status

()

defect
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: dholbert, Assigned: dholbert)

Tracking

(Blocks 1 bug)

Trunk
mozilla28
x86_64
Linux
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [qa-])

Attachments

(1 attachment, 1 obsolete attachment)

Build warnings on mozilla-central, with gcc 4.8:
{
js/src/jsinfer.cpp:581:14: warning: ‘js::types::CompilerConstraintList’ has a field ‘js::types::CompilerConstraintList::constraints’ whose type uses the anonymous namespace [enabled by default]

js/src/jsopcode.cpp:1490:8: warning: ‘ExpressionDecompiler’ has a field ‘ExpressionDecompiler::parser’ whose type uses the anonymous namespace [enabled by default]
}
This patch just drops the anonymous namespace around the types in question. This fixes the build warning for me.
Assignee: nobody → dholbert
Attachment #8342588 - Flags: review?(jdemooij)
Or, if you'd prefer to keep the anonymous namespace, this alternate patch just tweaks jsopcode.cpp it to put the owner struct (ExpressionDecompiler) in the anonymous namespace as well, which also fixes the problem.

(We can't do this in jsinfer.cpp, though -- there, the owner class (js::types::CompilerConstraintList) is already in a namespace, so we can't put it in the anonymous namespace. So this still drops the anonymous namespace there.)
Attachment #8342593 - Flags: review?(jdemooij)
Comment on attachment 8342593 [details] [diff] [review]
alternate fix: add more anonymous namespacing (in jsopcode.cpp, at least)

Review of attachment 8342593 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks!
Attachment #8342593 - Flags: review?(jdemooij) → review+
Comment on attachment 8342588 [details] [diff] [review]
fix v1: drop anonymous namespaces

Review of attachment 8342588 [details] [diff] [review]:
-----------------------------------------------------------------

Resetting review flag since I reviewed the other patch :)
Attachment #8342588 - Flags: review?(jdemooij)
Attachment #8342588 - Attachment is obsolete: true
Tree's closed, so I'll tag this as checkin-needed.
Flags: in-testsuite-
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/687680c04058
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.