tech-toolchain archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: clang++ vs va_start
On Fri, Jan 11, 2019 at 09:12:46AM +0100, Thomas Klausner wrote:
> When compiling webkit-gtk with clang from the base system (8.99.30,
> clang version 7.0.0 (trunk r337282)), I see:
>
> In file included from /scratch/www/webkit-gtk/work/webkitgtk-2.22.5/DerivedSources/WebCore/unified-sources/UnifiedSource297.cpp:6:
> /scratch/www/webkit-gtk/work/webkitgtk-2.22.5/Source/WebCore/platform/LocalizedStrings.cpp:70:5: error: cannot pass object of non-trivial type 'WTF::String' through variadic function; call will abort at runtime [-Wnon-pod-varargs]
> va_start(arguments, format);
The standard says arguments must be a POD type, e.g. it is not allowed
to have ctor or dtor. The workaround in most cases is to pass the string
as pointer (reference is not enough for reasons I never understood).
Joerg
Home |
Main Index |
Thread Index |
Old Index