LO 24.2 C++20 baseline

Stephan Bergmann sbergman at redhat.com
Mon Sep 25 10:48:01 UTC 2023


On 9/25/23 08:30, Miklos Vajna wrote:
> gcc-12 looks fine here, but I hit an interesting problem with clang-15
> (which worked fine before pulling):
> 
> $ make animations
> make -j 16 -f /home/vmiklos/git/libreoffice/core-clang/compilerplugins/Makefile-clang.mk compilerplugins
> make[1]: Entering directory '/home/vmiklos/git/libreoffice/core-clang'
> make[1]: Nothing to be done for 'compilerplugins'.
> make[1]: Leaving directory '/home/vmiklos/git/libreoffice/core-clang'
> cd /home/vmiklos/git/libreoffice/core-clang/animations && make -j 16 -rs
> [CXX] animations/source/animcore/animcore.cxx
> [LOC] top level modules: animations
> In file included from /home/vmiklos/git/libreoffice/core-clang/animations/source/animcore/animcore.cxx:20:
> In file included from /home/vmiklos/git/libreoffice/core-clang/workdir/UnoApiHeadersTarget/offapi/normal/com/sun/star/util/XCloneable.hpp:8:
> /home/vmiklos/git/libreoffice/core-clang/workdir/UnoApiHeadersTarget/udkapi/normal/com/sun/star/uno/XInterface.hpp:32:65: error: invalid application of 'sizeof' to an incomplete type 'animcore::(anonymous namespace)::AnimationNode'
> template<typename T> inline constexpr auto isUnoInterfaceType = sizeof (T) && IsUnoInterfaceType<T>::value;
>                                                                  ^~~~~~~~~~
> /home/vmiklos/git/libreoffice/core-clang/include/unotools/weakref.hxx:119:33: note: in instantiation of variable template specialization 'cppu::detail::isUnoInterfaceType' requested here
>          requires(!cppu::detail::isUnoInterfaceType<interface_type>)
>                                  ^
> /home/vmiklos/git/libreoffice/core-clang/animations/source/animcore/animcore.cxx:309:44: note: in instantiation of template class 'unotools::WeakReference<animcore::(anonymous namespace)::AnimationNode>' requested here
>      unotools::WeakReference<AnimationNode> mxParent;
>                                             ^
> /home/vmiklos/git/libreoffice/core-clang/animations/source/animcore/animcore.cxx:121:7: note: definition of 'animcore::(anonymous namespace)::AnimationNode' is not complete until the closing '}'
> class AnimationNode final:  public AnimationNodeBase
>        ^
> 1 error generated.
> make[1]: *** [/home/vmiklos/git/libreoffice/core-clang/solenv/gbuild/LinkTarget.mk:340: /home/vmiklos/git/libreoffice/core-clang/workdir/CxxObject/animations/source/animcore/animcore.o] Error 1
> make: *** [Makefile:121: animations] Error 2
> 
> Given that AnimationNode refers to itself, we probably can't provide a
> full type for unotools::WeakReference. But then how to get around this?

Was that maybe an intermittent Clang bug?  It apparently doesn't hit the 
Jenkins Clang builds, and I don't see it with trunk Clang 18 either, but 
have dim memories that there was some issue with too-eager evaluation 
causing something like this at some point.  Do you have a way to check 
with another Clang version, to substantiate that assumption?



More information about the LibreOffice mailing list