Closed
Bug 1483818
Opened 6 years ago
Closed 6 years ago
dom\base\AttrArray.h(214): warning C4200: nonstandard extension used: zero-sized array in struct/union - dom\base\AttrArray.h(214): note: This member will be ignored by a defaulted constructor or copy/move assignment operator
Categories
(Core :: DOM: Core & HTML, defect, P3)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla63
Tracking | Status | |
---|---|---|
firefox63 | --- | fixed |
People
(Reporter: jorgk-bmo, Assigned: emilio)
References
Details
Attachments
(1 file, 1 obsolete file)
1.49 KB,
patch
|
smaug
:
review+
jorgk-bmo
:
feedback+
|
Details | Diff | Splinter Review |
+++ This bug was initially created as a clone of Bug #1482866 +++ 1:42.90 c:\mozilla-source\comm-central\dom\base\AttrArray.h(214): error C2220: warning treated as error - no 'object' file generated 1:42.90 c:\mozilla-source\comm-central\dom\base\AttrArray.h(214): warning C4200: nonstandard extension used: zero-sized array in struct/union 1:42.90 c:\mozilla-source\comm-central\dom\base\AttrArray.h(214): note: This member will be ignored by a defaulted constructor or copy/move assignment operator
Reporter | ||
Comment 1•6 years ago
|
||
Workaround: Backout of https://hg.mozilla.org/mozilla-central/rev/cba97273eb10.
Reporter | ||
Comment 2•6 years ago
|
||
I filed bug 1483820 since that has become a general problem. This is the third case.
Assignee | ||
Comment 3•6 years ago
|
||
I think that warning should be just suppressed. I could make it a 1-size array, as it used to be, but I'm not sure that's fine either... Does this work Jorg? Though this is quite ugly, not sure where the global suppressions live.
Assignee | ||
Updated•6 years ago
|
Attachment #9001570 -
Flags: feedback?(jorgk)
Assignee | ||
Comment 4•6 years ago
|
||
Other compilers don't warn about it, and it's a somewhat common technique.
Attachment #9001572 -
Flags: feedback?(jorgk)
Assignee | ||
Comment 5•6 years ago
|
||
(In reply to Emilio Cobos Álvarez (:emilio) from comment #4) > Created attachment 9001572 [details] [diff] [review] > Disable zero-size array warning globally in MSVC. > > Other compilers don't warn about it, and it's a somewhat common technique. I'd prefer this one, should it work and should a build peer be fine with it :).
Reporter | ||
Comment 6•6 years ago
|
||
Comment on attachment 9001570 [details] [diff] [review] Disable warning about zero-size array in AttrArray::Impl Works.
Attachment #9001570 -
Flags: feedback?(jorgk) → feedback+
Reporter | ||
Comment 7•6 years ago
|
||
Comment on attachment 9001572 [details] [diff] [review] Disable zero-size array warning globally in MSVC. Works, too, but triggered a complete recompile :-(
Attachment #9001572 -
Flags: feedback?(jorgk) → feedback+
Assignee | ||
Updated•6 years ago
|
Attachment #9001572 -
Flags: review?(core-build-config-reviews)
Assignee | ||
Comment 8•6 years ago
|
||
(In reply to Jorg K (GMT+2) from comment #7) > Comment on attachment 9001572 [details] [diff] [review] > Disable zero-size array warning globally in MSVC. > > Works, too, but triggered a complete recompile :-( Thanks!
Reporter | ||
Comment 9•6 years ago
|
||
Comment on attachment 9001572 [details] [diff] [review] Disable zero-size array warning globally in MSVC. Sorry, spoke too early, after six minutes I got this: 5:56.37 DataChannel.cpp 5:56.37 c:\mozilla-source\comm-central\obj-x86_64-pc-mingw32\dist\include\AttrArray.h(214): error C2220: warning treated as error - no 'object' file generated 5:56.37 c:\mozilla-source\comm-central\obj-x86_64-pc-mingw32\dist\include\AttrArray.h(214): warning C4200: nonstandard extension used: zero-sized array in struct/union 5:56.37 c:\mozilla-source\comm-central\obj-x86_64-pc-mingw32\dist\include\AttrArray.h(214): note: This member will be ignored by a defaulted constructor or copy/move assignment operator 5:56.38 mozmake[4]: *** [c:/mozilla-source/comm-central/config/rules.mk:1090: DataChannel.obj] Error 2
Attachment #9001572 -
Flags: review?(core-build-config-reviews)
Attachment #9001572 -
Flags: feedback-
Attachment #9001572 -
Flags: feedback+
Reporter | ||
Comment 10•6 years ago
|
||
Emilio, can you please move this forward so people using MSVS C++ don't have to work with a band-aid.
Assignee | ||
Comment 11•6 years ago
|
||
(In reply to Jorg K (GMT+2) from comment #10) > Emilio, can you please move this forward so people using MSVS C++ don't have > to work with a band-aid. Yeah, sorry. I'd really prefer if we could globally disable the warning, but I guess the first patch should be enough for now.
Assignee | ||
Comment 12•6 years ago
|
||
Comment on attachment 9001570 [details] [diff] [review] Disable warning about zero-size array in AttrArray::Impl Impl is not trivially copiable, movable or copy-constructible, so the warning is pointless. Fix the build for now. I'll try to disable the MSVC warning globally in a followup bug and this patch can be reverted then.
Attachment #9001570 -
Flags: review?(bugs)
Assignee | ||
Updated•6 years ago
|
Attachment #9001572 -
Attachment is obsolete: true
Comment 13•6 years ago
|
||
Comment on attachment 9001570 [details] [diff] [review] Disable warning about zero-size array in AttrArray::Impl Looks like we use similar stuff elsewhere too.
Attachment #9001570 -
Flags: review?(bugs) → review+
Comment 14•6 years ago
|
||
Pushed by emilio@crisal.io: https://hg.mozilla.org/integration/mozilla-inbound/rev/1d4014247f20 Disable MSVC warning C4200 about zero-size arrays in AttrArray::Impl. r=smaug
Comment 15•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/1d4014247f20
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox63:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
Updated•6 years ago
|
Assignee: nobody → emilio
Comment 17•5 years ago
|
||
We should remove this workaround because we do not support MSVC anymore.
You need to log in
before you can comment on or make changes to this bug.
Description
•