Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding C++23 compatibility #3309

Open
AiraYumi opened this issue Dec 19, 2024 · 5 comments
Open

Adding C++23 compatibility #3309

AiraYumi opened this issue Dec 19, 2024 · 5 comments
Labels
triage Flags issues that need to be triaged

Comments

@AiraYumi
Copy link
Contributor

Description

Adding C++23 compatibility

@AiraYumi AiraYumi added the triage Flags issues that need to be triaged label Dec 19, 2024
@AiraYumi
Copy link
Contributor Author

gcc 13.3.0 errors

[ 87%] Building CXX object newview/CMakeFiles/secondlife-bin.dir/lltexturefetch.cpp.o
/home/ubuntu/poc_cpp23/indra/newview/llterrainpaintmap.cpp: In static member function ‘static LLTerrainPaintQueue LLTerrainPaintMap::convertPaintQueueRGBAToRG (LLViewerTexture&, LLTerrainPaintQueue&)’:
/home/ubuntu/poc_cpp23/indra/newview/llterrainpaintmap.cpp:614:12: error: cannot bind non-const lvalue reference of type ‘LLTerrainPaintQueue&’ to an rvalue of type ‘LLTerrainPaintQueue’
  614 |     return queue_out;
      |            ^~~~~~~~~
In file included from /home/ubuntu/poc_cpp23/indra/newview/llterrainpaintmap.cpp:27:
/home/ubuntu/poc_cpp23/indra/newview/llterrainpaintmap.h:116:46: note:   initializing argument 1 of ‘LLTerrainPaintQueue::LLTerrainPaintQueue(LLTerrainPaintQueue&)’
  116 |     LLTerrainPaintQueue(LLTerrainPaintQueue& other);
      |                         ~~~~~~~~~~~~~~~~~~~~~^~~~~
/home/ubuntu/poc_cpp23/indra/newview/llterrainpaintmap.cpp: In static member function ‘static LLTerrainPaintQueue LLTerrainPaintMap::convertBrushQueueToPaintRGB(const LLViewerRegion&, LLViewerTexture&, LLTerrainBrushQueue&)’:
/home/ubuntu/poc_cpp23/indra/newview/llterrainpaintmap.cpp:814:12: error: cannot bind non-const lvalue reference of type ‘LLTerrainPaintQueue&’ to an rvalue of type ‘LLTerrainPaintQueue’
  814 |     return queue_out;
      |            ^~~~~~~~~
/home/ubuntu/poc_cpp23/indra/newview/llterrainpaintmap.h:116:46: note:   initializing argument 1 of ‘LLTerrainPaintQueue::LLTerrainPaintQueue(LLTerrainPaintQueue&)’
  116 |     LLTerrainPaintQueue(LLTerrainPaintQueue& other);
      |                         ~~~~~~~~~~~~~~~~~~~~~^~~~~
[ 87%] Building CXX object newview/CMakeFiles/secondlife-bin.dir/lltextureinfo.cpp.o
[ 88%] Building CXX object newview/CMakeFiles/secondlife-bin.dir/lltextureinfodetails.cpp.o
At global scope:
cc1plus: note: unrecognized command-line option ‘-Wno-unused-local-typedef’ may have been intended to silence earlier diagnostics
gmake[2]: *** [newview/CMakeFiles/secondlife-bin.dir/build.make:8323: newview/CMakeFiles/secondlife-bin.dir/llterrainpaintmap.cpp.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....
[ 88%] Building CXX object newview/CMakeFiles/secondlife-bin.dir/lltexturestats.cpp.o
gmake[1]: *** [CMakeFiles/Makefile2:1553: newview/CMakeFiles/secondlife-bin.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2

@nat-goodspeed
Copy link
Collaborator

Does this patch help? It engages the standard C++ idiom for copy constructor and copy assignment.

diff --git a/indra/newview/llterrainpaintmap.cpp b/indra/newview/llterrainpaintmap.cpp
index a858f92d8e..6d446e6686 100644
--- a/indra/newview/llterrainpaintmap.cpp
+++ b/indra/newview/llterrainpaintmap.cpp
@@ -890,14 +890,14 @@ LLTerrainPaintQueue::LLTerrainPaintQueue(U8 components)
     llassert(mComponents == LLTerrainPaint::RGB || mComponents == LLTerrainPaint::RGBA);
 }
 
-LLTerrainPaintQueue::LLTerrainPaintQueue(LLTerrainPaintQueue& other)
+LLTerrainPaintQueue::LLTerrainPaintQueue(const LLTerrainPaintQueue& other)
 : LLTerrainQueue<LLTerrainPaint>(other)
 , mComponents(other.mComponents)
 {
     llassert(mComponents == LLTerrainPaint::RGB || mComponents == LLTerrainPaint::RGBA);
 }
 
-LLTerrainPaintQueue& LLTerrainPaintQueue::operator=(LLTerrainPaintQueue& other)
+LLTerrainPaintQueue& LLTerrainPaintQueue::operator=(const LLTerrainPaintQueue& other)
 {
     LLTerrainQueue<LLTerrainPaint>::operator=(other);
     mComponents = other.mComponents;
diff --git a/indra/newview/llterrainpaintmap.h b/indra/newview/llterrainpaintmap.h
index d4859b747b..720a9f1192 100644
--- a/indra/newview/llterrainpaintmap.h
+++ b/indra/newview/llterrainpaintmap.h
@@ -113,8 +113,8 @@ public:
     LLTerrainPaintQueue() = delete;
     // components determines what type of LLTerrainPaint is allowed. Must be 3 (RGB) or 4 (RGBA)
     LLTerrainPaintQueue(U8 components);
-    LLTerrainPaintQueue(LLTerrainPaintQueue& other);
-    LLTerrainPaintQueue& operator=(LLTerrainPaintQueue& other);
+    LLTerrainPaintQueue(const LLTerrainPaintQueue& other);
+    LLTerrainPaintQueue& operator=(const LLTerrainPaintQueue& other);
 
     bool enqueue(LLTerrainPaint::ptr_t& paint, bool dry_run = false);
     bool enqueue(LLTerrainPaintQueue& queue);

@AiraYumi
Copy link
Contributor Author

Thank you.
When I applied the patch, another error occurred.

[ 87%] Building CXX object newview/CMakeFiles/secondlife-bin.dir/lltexturefetch.cpp.o
/home/ubuntu/poc_cpp23/indra/newview/llterrainpaintmap.cpp: In copy constructor ‘LLTerrainPaintQueue::LLTerrainPaintQueue(const LLTerrainPaintQueue&)’:
/home/ubuntu/poc_cpp23/indra/newview/llterrainpaintmap.cpp:894:34: error: binding reference of type ‘LLTerrainQueue<LLTerrainPaint>&’ to ‘const LLTerrainQueue<LLTerrainPaint>’ discards qualifiers
  894 | : LLTerrainQueue<LLTerrainPaint>(other)
      |                                  ^~~~~
In file included from /home/ubuntu/poc_cpp23/indra/newview/llterrainpaintmap.cpp:27:
/home/ubuntu/poc_cpp23/indra/newview/llterrainpaintmap.h:68:39: note:   initializing argument 1 of ‘LLTerrainQueue<T>::LLTerrainQueue(LLTerrainQueue<T>&) [with T = LLTerrainPaint]’
   68 |     LLTerrainQueue(LLTerrainQueue<T>& other);
      |                    ~~~~~~~~~~~~~~~~~~~^~~~~
/home/ubuntu/poc_cpp23/indra/newview/llterrainpaintmap.cpp: In member function ‘LLTerrainPaintQueue& LLTerrainPaintQueue::operator=(const LLTerrainPaintQueue&)’:
/home/ubuntu/poc_cpp23/indra/newview/llterrainpaintmap.cpp:902:47: error: binding reference of type ‘LLTerrainQueue<LLTerrainPaint>&’ to ‘const LLTerrainQueue<LLTerrainPaint>’ discards qualifiers
  902 |     LLTerrainQueue<LLTerrainPaint>::operator=(other);
      |                                               ^~~~~
/home/ubuntu/poc_cpp23/indra/newview/llterrainpaintmap.h:69:50: note:   initializing argument 1 of ‘LLTerrainQueue<T>& LLTerrainQueue<T>::operator=(LLTerrainQueue<T>&) [with T = LLTerrainPaint]’
   69 |     LLTerrainQueue& operator=(LLTerrainQueue<T>& other);
      |                               ~~~~~~~~~~~~~~~~~~~^~~~~

but I was able to build it after changing the part where the other error occurred based on the patch.

AiraYumi@45acab5

@AiraYumi
Copy link
Contributor Author

checking...

/Applications/Xcode_16.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c++ -ivfsstatcache /var/folders/1b/_r1lmxr92j54bq1tx8b953mw0000gn/C/com.apple.DeveloperTools/16.1-16B40/Xcode/SDKStatCaches.noindex/macosx15.1-24B75-e9bd6b24234ea854f230c6ba307e68e6.sdkstatcache -fmessage-length\=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit\=0 -fno-color-diagnostics -Wno-trigraphs -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-return-type -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wno-unused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-bool-conversion -Wno-enum-conversion -Wno-float-conversion -Wno-non-literal-null-conversion -Wno-objc-literal-conversion -Wno-shorten-64-to-32 -Wno-newline-eof -Wno-c++11-extensions -Wno-implicit-fallthrough -fno-strict-aliasing -Wdeprecated-declarations -Winvalid-offsetof -Wno-sign-conversion -Wno-infinite-recursion -Wno-move -Wno-comma -Wno-block-capture-autoreleasing -Wno-strict-prototypes -Wno-range-loop-analysis -Wno-semicolon-before-method-body -Wno-deprecated-declarations -Wall -Wno-sign-compare -Wno-trigraphs -Wno-reorder -Wno-unused-but-set-variable -Wno-unused-variable -Wno-unused-local-typedef -Werror @/Users/runner/work/viewer/viewer/build-darwin-x86_64/build/secondlife-bin.build/Release/Objects-normal/x86_64/82b82416624d2658e5098eb0a28c15c5-common-args.resp -include /Users/runner/work/viewer/viewer/build-darwin-x86_64/build/SharedPrecompiledHeaders/SharedPrecompiledHeaders/4582863299706567183/cmake_pch.hxx -MMD -MT dependencies -MF /Users/runner/work/viewer/viewer/build-darwin-x86_64/build/secondlife-bin.build/Release/Objects-normal/x86_64/llpanelface.d --serialize-diagnostics /Users/runner/work/viewer/viewer/build-darwin-x86_64/build/secondlife-bin.build/Release/Objects-normal/x86_64/llpanelface.dia -c /Users/runner/work/viewer/viewer/indra/newview/llpanelface.cpp -o /Users/runner/work/viewer/viewer/build-darwin-x86_64/build/secondlife-bin.build/Release/Objects-normal/x86_64/llpanelface.o
In file included from /Users/runner/work/viewer/viewer/indra/newview/llpanelface.cpp:1:
In file included from /Users/runner/work/viewer/viewer/build-darwin-x86_64/newview/CMakeFiles/secondlife-bin.dir/Release/cmake_pch.hxx:4:
In file included from /Users/runner/work/viewer/viewer/indra/newview/llviewerprecompiledheaders.h:36:
In file included from /Users/runner/work/viewer/viewer/indra/llcommon/linden_common.h:30:
In file included from /Users/runner/work/viewer/viewer/indra/llcommon/llprofiler.h:79:
In file included from /Users/runner/work/viewer/viewer/build-darwin-x86_64/packages/include/tracy/tracy/Tracy.hpp:129:
In file included from /Users/runner/work/viewer/viewer/build-darwin-x86_64/packages/include/tracy/tracy/../client/TracyLock.hpp:9:
In file included from /Users/runner/work/viewer/viewer/build-darwin-x86_64/packages/include/tracy/tracy/../client/TracyProfiler.hpp:10:
In file included from /Users/runner/work/viewer/viewer/build-darwin-x86_64/packages/include/tracy/tracy/../client/tracy_concurrentqueue.h:55:
In file included from /Applications/Xcode_16.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.1.sdk/usr/include/c++/v1/algorithm:1822:
In file included from /Applications/Xcode_16.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.1.sdk/usr/include/c++/v1/__algorithm/inplace_merge.h:28:
/Applications/Xcode_16.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.1.sdk/usr/include/c++/v1/__memory/unique_ptr.h:64:19: error: invalid application of 'sizeof' to an incomplete type 'PBRPickerAgentListener'
   64 |     static_assert(sizeof(_Tp) >= 0, "cannot delete an incomplete type");
      |                   ^~~~~~~~~~~
/Applications/Xcode_16.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.1.sdk/usr/include/c++/v1/__memory/unique_ptr.h:266:7: note: in instantiation of member function 'std::default_delete<PBRPickerAgentListener>::operator()' requested here
  266 |       __ptr_.second()(__tmp);
      |       ^
/Applications/Xcode_16.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.1.sdk/usr/include/c++/v1/__memory/unique_ptr.h:236:71: note: in instantiation of member function 'std::unique_ptr<PBRPickerAgentListener>::reset' requested here
  236 |   _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 ~unique_ptr() { reset(); }
      |                                                                       ^
/Users/runner/work/viewer/viewer/indra/newview/llpanelface.cpp:464:14: note: in instantiation of member function 'std::unique_ptr<PBRPickerAgentListener>::~unique_ptr' requested here
  464 | LLPanelFace::LLPanelFace()
      |              ^
In file included from /Users/runner/work/viewer/viewer/indra/newview/llpanelface.cpp:30:
/Users/runner/work/viewer/viewer/indra/newview/llpanelface.h:57:7: note: forward declaration of 'PBRPickerAgentListener'
   57 | class PBRPickerAgentListener;
      |       ^
In file included from /Users/runner/work/viewer/viewer/indra/newview/llpanelface.cpp:1:
In file included from /Users/runner/work/viewer/viewer/build-darwin-x86_64/newview/CMakeFiles/secondlife-bin.dir/Release/cmake_pch.hxx:4:
In file included from /Users/runner/work/viewer/viewer/indra/newview/llviewerprecompiledheaders.h:36:
In file included from /Users/runner/work/viewer/viewer/indra/llcommon/linden_common.h:30:
In file included from /Users/runner/work/viewer/viewer/indra/llcommon/llprofiler.h:79:
In file included from /Users/runner/work/viewer/viewer/build-darwin-x86_64/packages/include/tracy/tracy/Tracy.hpp:129:
In file included from /Users/runner/work/viewer/viewer/build-darwin-x86_64/packages/include/tracy/tracy/../client/TracyLock.hpp:9:
In file included from /Users/runner/work/viewer/viewer/build-darwin-x86_64/packages/include/tracy/tracy/../client/TracyProfiler.hpp:10:
In file included from /Users/runner/work/viewer/viewer/build-darwin-x86_64/packages/include/tracy/tracy/../client/tracy_concurrentqueue.h:55:
In file included from /Applications/Xcode_16.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.1.sdk/usr/include/c++/v1/algorithm:1822:
In file included from /Applications/Xcode_16.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.1.sdk/usr/include/c++/v1/__algorithm/inplace_merge.h:28:
/Applications/Xcode_16.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.1.sdk/usr/include/c++/v1/__memory/unique_ptr.h:64:19: error: invalid application of 'sizeof' to an incomplete type 'PBRPickerObjectListener'
   64 |     static_assert(sizeof(_Tp) >= 0, "cannot delete an incomplete type");
      |                   ^~~~~~~~~~~
/Applications/Xcode_16.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.1.sdk/usr/include/c++/v1/__memory/unique_ptr.h:266:7: note: in instantiation of member function 'std::default_delete<PBRPickerObjectListener>::operator()' requested here
  266 |       __ptr_.second()(__tmp);
      |       ^
/Applications/Xcode_16.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.1.sdk/usr/include/c++/v1/__memory/unique_ptr.h:236:71: note: in instantiation of member function 'std::unique_ptr<PBRPickerObjectListener>::reset' requested here
  236 |   _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 ~unique_ptr() { reset(); }
      |                                                                       ^
/Users/runner/work/viewer/viewer/indra/newview/llpanelface.cpp:464:14: note: in instantiation of member function 'std::unique_ptr<PBRPickerObjectListener>::~unique_ptr' requested here
  464 | LLPanelFace::LLPanelFace()
      |              ^
In file included from /Users/runner/work/viewer/viewer/indra/newview/llpanelface.cpp:30:
/Users/runner/work/viewer/viewer/indra/newview/llpanelface.h:58:7: note: forward declaration of 'PBRPickerObjectListener'
   58 | class PBRPickerObjectListener;
      |       ^
2 errors generated.

@AiraYumi
Copy link
Contributor Author

AiraYumi commented Jan 10, 2025

gcc-15 ok
gcc-14 failed

In file included from /usr/include/string.h:548,
                 from /usr/include/c++/14/cstring:43,
                 from /home/ubuntu/viewer/indra/llcommon/linden_common.h:47,
                 from /home/ubuntu/viewer/indra/newview/llviewerprecompiledheaders.h:36,
                 from /home/ubuntu/viewer/build-linux-x86_64/newview/CMakeFiles/secondlife-bin.dir/cmake_pch.hxx:5,
                 from <command-line>:
In function ‘void* memcpy(void*, const void*, size_t)’,
    inlined from ‘void boost::function_n<R, T>::assign_to_own(const boost::function_n<R, T>&) [with R = void; T = {LLUICtrl*, const LLSD&}]’ at /home/ubuntu/viewer/build-linux-x86_64/packages/include/boost/function/function_template.hpp:908:22,
    inlined from ‘boost::function_n<R, T>::function_n(const boost::function_n<R, T>&) [with R = void; T = {LLUICtrl*, const LLSD&}]’ at /home/ubuntu/viewer/build-linux-x86_64/packages/include/boost/function/function_template.hpp:774:26,
    inlined from ‘boost::function<R(T ...)>::function(const self_type&) [with R = void; T = {LLUICtrl*, const LLSD&}]’ at /home/ubuntu/viewer/build-linux-x86_64/packages/include/boost/function/function_template.hpp:1099:76,
    inlined from ‘boost::function<R(T ...)>::self_type& boost::function<R(T ...)>::operator=(const self_type&) [with R = void; T = {LLUICtrl*, const LLSD&}]’ at /home/ubuntu/viewer/build-linux-x86_64/packages/include/boost/function/function_template.hpp:1109:5,
    inlined from ‘void LLTextureCtrl::setOnCancelCallback(LLUICtrl::commit_callback_t)’ at /home/ubuntu/viewer/indra/newview/lltexturectrl.h:233:75,
    inlined from ‘void LLPanelRegionTerrainInfo::initMaterialCtrl(LLTextureCtrl*&, const std::string&, S32)’ at /home/ubuntu/viewer/indra/newview/llfloaterregioninfo.cpp:1982:30:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:29:33: error: ‘*(unsigned char (*)[24])((char*)&<unnamed> + offsetof(boost::commit_callback_t, boost::function<void(LLUICtrl*, const LLSD&)>::<unnamed>.boost::function_n<void, LLUICtrl*, const LLSD&>::<unnamed>.boost::function_base::functor))’ may be used uninitialized [-Werror=maybe-uninitialized]
   29 |   return __builtin___memcpy_chk (__dest, __src, __len,
      |          ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
   30 |                                  __glibc_objsize0 (__dest));
      |                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/ubuntu/viewer/indra/newview/llfloaterregioninfo.cpp: In member function   void LLPanelRegionTerrainInfo::initMaterialCtrl(LLTextureCtrl*&, const std::string&, S32)’:
/home/ubuntu/viewer/indra/newview/llfloaterregioninfo.cpp:1982:30: note: ‘<anonymous>’ declared here
 1982 |     ctrl->setOnCancelCallback([](LLUICtrl* ctrl, const LLSD& param) {});
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~

gcc-12.4.0 and gcc-13.3.0 failed

In file included from /home/ubuntu/viewer/build-linux-x86_64/packages/include/boost/spirit/home/classic/attribute/closure.hpp:21,
                 from /home/ubuntu/viewer/build-linux-x86_64/packages/include/boost/spirit/home/classic/attribute.hpp:35,
                 from /home/ubuntu/viewer/build-linux-x86_64/packages/include/boost/spirit/include/classic_attribute.hpp:11,
                 from /home/ubuntu/viewer/indra/llmath/llcalcparser.h:30,
                 from /home/ubuntu/viewer/indra/llmath/llcalc.cpp:31:
In member function ‘void phoenix::impl::closure_frame_holder<FrameT>::set(frame_t*) [with FrameT = phoenix::closure_frame<phoenix::closure<float, phoenix::nil_t, phoenix::nil_t, phoenix::nil_t, phoenix::nil_t, phoenix::nil_t> >]’,
    inlined from ‘phoenix::closure_frame<ClosureT>::closure_frame(const ClosureT&) [with ClosureT = phoenix::closure<float, phoenix::nil_t, phoenix::nil_t, phoenix::nil_t, phoenix::nil_t, phoenix::nil_t>]’ at /home/ubuntu/viewer/build-linux-x86_64/packages/include/boost/spirit/home/classic/phoenix/closures.hpp:226:2 ,
    inlined from ‘boost::spirit::classic::closure_context<ClosureT>::closure_context(const ClosureT&) [with ClosureT = LLCalcParser::value_closure]’ at /home/ubuntu/viewer/build-linux-x86_64/packages/include/boost/spirit/home/classic/attribute/closure.hpp:75:11,
    inlined from ‘boost::spirit::classic::closure_context_linker<ContextT>::closure_context_linker(const ParserT&) [with ParserT = boost::spirit::classic::impl::rule_base<boost::spirit::classic::rule<boost::spirit::classic::scanner<__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >, boost::spirit::classic::scanner_policies<boost::spirit::classic::skipper_iteration_policy<> > >, boost::spirit::classic::closure_context<LLCalcParser::value_closure>, boost::spirit::classic::nil_t>, const boost::spirit::classic::rule<boost::spirit::classic::scanner<__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >, boost::spirit::classic::scanner_policies<boost::spirit::classic::skipper_iteration_policy<> > >, boost::spirit::classic::closure_context<LLCalcParser::value_closure>, boost::spirit::classic::nil_t>&, boost::spirit::classic::scanner<__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >, boost::spirit::classic::scanner_policies<boost::spirit::classic::skipper_iteration_policy<> > >, boost::spirit::classic::closure_context<LLCalcParser::value_closure>, boost::spirit::classic::nil_t>; ContextT = boost::spirit::classic::closure_context<LLCalcParser::value_closure>]’ at /home/ubuntu/viewer/build-linux-x86_64/packages/include/boost/spirit/home/classic/attribute/closure_context.hpp:37:17,
    inlined from ‘typename boost::spirit::classic::parser_result<DerivedT, ScannerT>::type boost::spirit::classic::impl::rule_base<DerivedT, EmbedT, T0, T1, T2>::parse(const ScannerT&) const [with ScannerT = boost::spirit::classic::scanner<__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >, boost::spirit::classic::scanner_policies<boost::spirit::classic::skipper_iteration_policy<> > >; DerivedT = boost::spirit::classic::rule<boost::spirit::classic::scanner<__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >, boost::spirit::classic::scanner_policies<boost::spirit::classic::skipper_iteration_policy<> > >, boost::spirit::classic::closure_context<LLCalcParser::value_closure>, boost::spirit::classic::nil_t>; EmbedT = const boost::spirit::classic::rule<boost::spirit::classic::scanner<__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >, boost::spirit::classic::scanner_policies<boost::spirit::classic::skipper_iteration_policy<> > >, boost::spirit::classic::closure_context<LLCalcParser::value_closure>, boost::spirit::classic::nil_t>&; T0 = boost::spirit::classic::scanner<__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >, boost::spirit::classic::scanner_policies<boost::spirit::classic::skipper_iteration_policy<> > >; T1 = boost::spirit::classic::closure_context<LLCalcParser::value_closure>; T2 = boost::spirit::classic::nil_t]’ at /home/ubuntu/viewer/build-linux-x86_64/packages/include/boost/spirit/home/classic/core/non_terminal/impl/rule.ipp:173:17:
/home/ubuntu/viewer/build-linux-x86_64/packages/include/boost/spirit/home/classic/phoenix/closures.hpp:175:38: error: storing the address of local variable ‘context_wrap’ in ‘*(phoenix::impl::closure_frame_holder<phoenix::closure_frame<phoenix::closure<float, phoenix::nil_t, phoenix::nil_t, phoenix::nil_t, phoenix::nil_t, phoenix::nil_t> > >*)this.phoenix::impl::closure_frame_holder<phoenix::closure_frame<phoenix::closure<float, phoenix::nil_t, phoenix::nil_t, phoenix::nil_t, phoenix::nil_t, phoenix::nil_t> > >::frame’ [-Werror=dangling-pointer=]
  175 |         void set(frame_t *f) { frame = f; }
      |                                ~~~~~~^~~
In file included from /home/ubuntu/viewer/build-linux-x86_64/packages/include/boost/spirit/home/classic/attribute/closure.hpp:16:
/home/ubuntu/viewer/build-linux-x86_64/packages/include/boost/spirit/home/classic/core/non_terminal/impl/rule.ipp: In member function ‘typename boost::spirit::classic::parser_result<DerivedT, ScannerT>::type boost::spirit::classic::impl::rule_base<DerivedT, EmbedT, T0, T1, T2>::parse(const ScannerT&) const [with ScannerT = boost::spirit::classic::scanner<__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >, boost::spirit::classic::scanner_policies<boost::spirit::classic::skipper_iteration_policy<> > >; DerivedT = boost::spirit::classic::rule<boost::spirit::classic::scanner<__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >, boost::spirit::classic::scanner_policies<boost::spirit::classic::skipper_iteration_policy<> > >, boost::spirit::classic::closure_context<LLCalcParser::value_closure>, boost::spirit::classic::nil_t>; EmbedT = const boost::spirit::classic::rule<boost::spirit::classic::scanner<__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >, boost::spirit::classic::scanner_policies<boost::spirit::classic::skipper_iteration_policy<> > >, boost::spirit::classic::closure_context<LLCalcParser::value_closure>, boost::spirit::classic::nil_t>&; T0 = boost::spirit::classic::scanner<__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >, boost::spirit::classic::scanner_policies<boost::spirit::classic::skipper_iteration_policy<> > >; T1 = boost::spirit::classic::closure_context<LLCalcParser::value_closure>; T2 = boost::spirit::classic::nil_t]’:
/home/ubuntu/viewer/build-linux-x86_64/packages/include/boost/spirit/home/classic/core/non_terminal/impl/rule.ipp:173:17: note: ‘context_wrap’ declared here
  173 |                 BOOST_SPIRIT_CONTEXT_PARSE(
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/ubuntu/viewer/build-linux-x86_64/packages/include/boost/spirit/home/classic/core/non_terminal/rule.hpp:33,
                 from /home/ubuntu/viewer/build-linux-x86_64/packages/include/boost/spirit/home/classic/core.hpp:41,
                 from /home/ubuntu/viewer/build-linux-x86_64/packages/include/boost/spirit/include/classic_core.hpp:11,
                 from /home/ubuntu/viewer/indra/llmath/llcalcparser.h:31:
/home/ubuntu/viewer/build-linux-x86_64/packages/include/boost/spirit/home/classic/core/non_terminal/impl/rule.ipp:169:41: note: ‘this’ declared here
  169 |             parse(ScannerT const& scan) const
      |

gcc-11 ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage Flags issues that need to be triaged
Projects
None yet
Development

No branches or pull requests

2 participants