Closed
Bug 867636
Opened 12 years ago
Closed 11 years ago
js/src/jscntxt.h:615:46: warning: type attributes ignored after type is already defined [-Wattributes]
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: dholbert, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
693 bytes,
patch
|
Details | Diff | Splinter Review |
New GCC build warning (with gcc 4.8):
{
In file included from js/src/jsproxy.cpp:12:0:
js/src/jscntxt.h:615:46: warning: type attributes ignored after type is already defined [-Wattributes]
}
...and similarly, a few lines later:
{
In file included from js/src/jswrapper.cpp:10:0:
js/src/jscntxt.h:615:46: warning: type attributes ignored after type is already defined [-Wattributes]
}
The thing being warned about at line 615 is:
> class JS_FRIEND_API(AutoEnterPolicy);
This seems to be basically a new instance of bug 845868.
Reporter | ||
Comment 1•12 years ago
|
||
From a bit of hg bisecting, it looks like this was introduced by:
{
changeset: 130017:9ab1119d4596
user: Nicholas Nethercote <nnethercote@mozilla.com>
date: Tue Apr 23 23:44:36 2013 -0700
summary: Bug 634839 (part 1) - Remove unnecessary headers (as found by include-what-you-use) from js/src/jsfoo.cpp files. r=luke.
}
https://hg.mozilla.org/mozilla-central/rev/9ab1119d4596
Blocks: 634839
Reporter | ||
Comment 2•12 years ago
|
||
This happens because AutoEnterPolicy is defined in jsproxy.h, and both of these .cpp files #include jsproxy.h before jscntxt.h. (in the case of jswrapper, its own .h file has the #include for jsproxy.h)
Reporter | ||
Comment 3•12 years ago
|
||
One way to fix this is just to #include jscntxt.h in jsproxy.h, so that we'll be guaranteed to see the forward-declaration before the definition.
There may be a better solution, though.
Reporter | ||
Comment 4•12 years ago
|
||
(It looks like this type of warning was reported as a bug to GCC in http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39159 , FWIW... though that was in 2009 and there's been no action on that bug since it was filed.)
Comment 5•11 years ago
|
||
I'm pretty sure this isn't present any more.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•