Bug 252671 - TimingFunction.h -Wdangling-reference warning spam with GCC 13
Summary: TimingFunction.h -Wdangling-reference warning spam with GCC 13
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Michael Catanzaro
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-02-21 09:23 PST by Michael Catanzaro
Modified: 2023-02-28 09:24 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Catanzaro 2023-02-21 09:23:12 PST
This is obviously a false positive (GCC does not understand leakRef), so we'll need to suppress it either individually or project-wide. For now I think only TimingFunction.h is a problem so individual suppressions will suffice.

/builddir/build/BUILD/webkitgtk-2.39.90/Source/WebCore/platform/animation/TimingFunction.h: In static member function 'static const WebCore::LinearTimingFunction& WebCore::LinearTimingFunction::sharedLinearTimingFunction()':
/builddir/build/BUILD/webkitgtk-2.39.90/Source/WebCore/platform/animation/TimingFunction.h:75:44: warning: possibly dangling reference to a temporary [-Wdangling-reference]
   75 |         static const LinearTimingFunction& function = create().leakRef();
      |                                            ^~~~~~~~
/builddir/build/BUILD/webkitgtk-2.39.90/Source/WebCore/platform/animation/TimingFunction.h:75:71: note: the temporary was destroyed at the end of the full expression 'WebCore::LinearTimingFunction::create()().WTF::Ref<WebCore::LinearTimingFunction>::leakRef()'
   75 |         static const LinearTimingFunction& function = create().leakRef();
      |                                                       ~~~~~~~~~~~~~~~~^~
/builddir/build/BUILD/webkitgtk-2.39.90/Source/WebCore/platform/animation/TimingFunction.h: In static member function 'static const WebCore::CubicBezierTimingFunction& WebCore::CubicBezierTimingFunction::defaultTimingFunction()':
/builddir/build/BUILD/webkitgtk-2.39.90/Source/WebCore/platform/animation/TimingFunction.h:141:49: warning: possibly dangling reference to a temporary [-Wdangling-reference]
  141 |         static const CubicBezierTimingFunction& function = create().leakRef();
      |                                                 ^~~~~~~~
/builddir/build/BUILD/webkitgtk-2.39.90/Source/WebCore/platform/animation/TimingFunction.h:141:76: note: the temporary was destroyed at the end of the full expression 'WebCore::CubicBezierTimingFunction::create()().WTF::Ref<WebCore::CubicBezierTimingFunction>::leakRef()'
  141 |         static const CubicBezierTimingFunction& function = create().leakRef();
Comment 1 Radar WebKit Bug Importer 2023-02-28 09:24:18 PST
<rdar://problem/106034923>