Closed Bug 1634949 Opened 4 years ago Closed 4 years ago

error: aggregate initialization of type 'mozilla::dom::IpdlQueueBuffer' with user-declared constructors is incompatible with C++20 [-Werror,-Wc++20-compat]

Categories

(Core :: Graphics: CanvasWebGL, defect)

defect

Tracking

()

RESOLVED FIXED
mozilla78
Tracking Status
firefox-esr68 --- unaffected
firefox75 --- unaffected
firefox76 --- unaffected
firefox77 --- fixed
firefox78 --- fixed

People

(Reporter: Sylvestre, Assigned: handyman)

References

(Blocks 2 open bugs, Regression)

Details

(Keywords: regression)

Attachments

(1 file)

with clang trunk

In file included from UnifiedProtocols11.cpp:83:
In file included from /var/lib/jenkins/workspace/firefox-clang-lld-last/obj-x86_64-pc-linux-gnu/ipc/ipdl/PCompositorBridge.cpp:26:
In file included from /var/lib/jenkins/workspace/firefox-clang-lld-last/obj-x86_64-pc-linux-gnu/ipc/ipdl/_ipdlheaders/mozilla/dom/PWebGLParent.h:20:
/var/lib/jenkins/workspace/firefox-clang-lld-last/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/IpdlQueue.h:240:43: error: aggregate initialization of type 'mozilla::dom::IpdlQueueBuffer' with user-declared constructors is incompatible with C++20 [-Werror,-Wc++20-compat]
               toSendSync, IpdlQueueBuffer{mId, std::move(mSerializedData)})
                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

David, could you please have a look?
thanks

Flags: needinfo?(davidp99)
Component: Source Code Analysis → Canvas: WebGL
Product: Firefox Build System → Core

It's interesting that this only happens on trunk. The warning message dates back to clang 8 so we should have seen it sooner. Maybe the conditions for "has a user-declared constructor" have changed? The constructor for IpdlQueueBuffer looks pretty vanilla to me!

I'll take clang's word for it and switch to a normal constructor. I can't keep track of all of the list constructor exceptions.

Flags: needinfo?(davidp99)

The list-initialization previously used is illegal for this case in C++20.

Assignee: nobody → davidp99
Status: NEW → ASSIGNED

This error comes up in clang 10 as well.

Blocks: clang-10

Actually managed to convince me it makes sense.

Pushed by daparks@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/385f49adaf00
Avoid list-initializer construction in WebGL IpdlQueueBuffer r=jgilbert

Yeah I'm not thrilled about it, but I see why they did it. I wish I had a way to trivially declare a defaulted aggregate constructor, though.

Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla78

Set release status flags based on info from the regressing bug 1621762

The patch landed in nightly and beta is affected.
:handyman, is this bug important enough to require an uplift?
If not please set status_beta to wontfix.

For more information, please visit auto_nag documentation.

Flags: needinfo?(davidp99)

Comment on attachment 9145649 [details]
Bug 1634949: Avoid list-initializer construction in WebGL IpdlQueueBuffer r=jgilbert!

Beta/Release Uplift Approval Request

  • User impact if declined: None. This code is not live. The impact is to anyone investigating clang-trunk builds or in the event that clang-trunk is promoted while this is still in repo.
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): The code is not in any execution path (requires changing a config setting).
  • String changes made/needed: N/A
Flags: needinfo?(davidp99)
Attachment #9145649 - Flags: approval-mozilla-beta?

Comment on attachment 9145649 [details]
Bug 1634949: Avoid list-initializer construction in WebGL IpdlQueueBuffer r=jgilbert!

Low risk and regressed in 77 nightly, uplift approved for beta, thanks.

Attachment #9145649 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: