tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: clang++ vs va_start



In article <20190111081246.uqaofriyij6qnhpg@danbala>,
Thomas Klausner  <tk%giga.or.at@localhost> 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
>    va_start(arguments, format);
>    ^
>/usr/include/stdarg.h:57:28: note: expanded from macro 'va_start'
>#define va_start(ap, last)      __builtin_va_start((ap), (last))
>                                ^
>/usr/include/stdarg.h:49:70: note: expanded from macro '__builtin_va_start'
>#define __builtin_va_start(ap, last)    __builtin_stdarg_start((ap), (last))
>                                                                     ^
>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: warning: second argument to 'va_start' is not the last
>/usr/include/stdarg.h:57:28: note: expanded from macro 'va_start'
>#define va_start(ap, last)      __builtin_va_start((ap), (last))
>                                ^
>/usr/include/stdarg.h:49:70: note: expanded from macro '__builtin_va_start'
>#define __builtin_va_start(ap, last)    __builtin_stdarg_start((ap), (last))
>                                                                     ^
>1 warning and 1 error generated.
>
>
>The function around line 70 is
>
>String formatLocalizedString(String format, ...)

Perhaps change this to:

String formatLocalizedString(const String& format, ...)

christos



Home | Main Index | Thread Index | Old Index