diff options
author | Stephan Bergmann <stephan.bergmann@allotropia.de> | 2023-12-06 21:49:38 +0100 |
---|---|---|
committer | Stephan Bergmann <stephan.bergmann@allotropia.de> | 2023-12-07 09:05:18 +0100 |
commit | 0f32809a86630d9e8bbf46fef23e189896c8a497 (patch) | |
tree | 7b0a686b2bcd2662dc775700ff476c4044a6925b /configure.ac | |
parent | d4370db8ceb74950d3ef381d4a0c1aca033f0294 (diff) |
Adapt consteval failure check to recent GCC 14 trunk
...which happens to accept the original check from
af34108d90bbbce90cf00c4b23961787599c7fa5 "Use C++20 consteval for the
Color(sal_uInt32) ctor" now, but would still fail to compile the actual code at
> In file included from xmloff/source/chart/ColorPropertySet.hxx:23,
> from xmloff/source/chart/ColorPropertySet.cxx:20:
> include/tools/color.hxx: In constructor ‘xmloff::chart::ColorPropertySet::ColorPropertySet(Color)’:
> xmloff/source/chart/ColorPropertySet.cxx:81:9: in ‘constexpr’ expansion of ‘((xmloff::chart::ColorPropertySet*)this)->xmloff::chart::ColorPropertySet::m_nDefaultColor.Color::Color(10079487)’
> include/tools/color.hxx:82:11: error: modification of ‘*(xmloff::chart::ColorPropertySet*)this’ is not a constant expression
> 82 | : mValue(nColor)
> | ^~~~~~~~~~~~~~
(see the comment at <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98752#c6>
"wrong "error: ‘this’ is not a constant expression" with consteval constructor")
Change-Id: I3b8b92cd7ba31724cf0c9fe38b6cf8aa2abd7c0f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160405
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index e41223ff7ec1..1f3398fd5a0b 100644 --- a/configure.ac +++ b/configure.ac @@ -14656,7 +14656,10 @@ AC_RUN_IFELSE([AC_LANG_PROGRAM([ }; S const s; - struct S1 { consteval S1(int) {} }; + struct S1 { + int a; + consteval S1(int n): a(n) {} + }; struct S2 { S1 x; S2(): x(0) {} |