- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
/home/zoku88/Documents/mozilla-central-icc/ipc/chromium/src/base/string_util.cc(895): error: expected an identifierbase_va_copy(backup_ap, ap);
templatestatic void StringAppendVT(StringType* dst,const typename StringType::value_type* format,va_list ap) {// First try with a small fixed size buffer.// This buffer size should be kept in sync with StringUtilTest.GrowBoundary// and StringUtilTest.StringPrintfBounds.typename StringType::value_type stack_buf[1024];va_list backup_ap;base_va_copy(backup_ap, ap);
namespace base {// It's possible for functions that use a va_list, such as StringPrintf, to// invalidate the data in it upon use. The fix is to make a copy of the// structure before using it and use that copy instead. va_copy is provided// for this purpose. MSVC does not provide va_copy, so define an// implementation here. It is not guaranteed that assignment is a copy, so the// StringUtil.VariableArgsFunc unit test tests this capability.// The C standard says that va_copy is a "macro", not a function. Trying to// use va_list as ref args to a function, as above, breaks some machines.# if defined(COMPILER_GCC)# define base_va_copy(_a, _b) ::va_copy(_a, _b)# elif defined(COMPILER_MSVC)# define base_va_copy(_a, _b) (_a = _b)# else# error No va_copy for your compiler# endif} // namespace base
# define base_va_copy(_a, _b) ::va_copy(_a, _b)
# define base_va_copy(_a, _b) (_a = _b)
export CC="icc"export CXX="icpc"export CFLAGS="-xHOST -fomit-frame-pointer -fp-model fast=2 -ipo18 -w -Dva_copy=__builtin_va_copy"export CXXFLAGS=$CFLAGSac_add_options --enable-optimize="-O2"ac_add_options --disable-debug # Don't put debugging information in the binary.ac_add_options --enable-static # Use these two options to make the build static,ac_add_options --disable-shared # so it will be faster and smaller.ac_add_options --disable-tests # tests take forever to build and are useless unless you're a Gecko developer.mk_add_options MOZ_MAKE_FLAGS="-j4"ac_add_options --x-includes=/usr/X11R6/include # The X11 includes are in /usr/X11R6/include (yeah, it detects them, but it's faster like this)
ac_add_options --x-libraries=/usr/X11R6/lib # The X11 libs are in /usr/X11R6/lib (see above)
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I can reproduce the problem with the example below with 12.0 but not 12.1.
// the example gives error with icpc 12.0 butnot with 12.1
#include
#define base_va_copy(_a, _b) ::va_copy(_a, _b)
void foo(va_list ap)
{
va_list backup_ap;
base_va_copy(backup_ap, ap);
}
int main() {
return 0;
}
I think this describes the problem/fix:
In configurations with GCC_BUILTIN_VARARGS set to TRUE, the front end
supports GCC-like built-in variadic parameter operators like
__builtin_va_start and __builtin_va_arg. Previously, these operators
were implemented as keywords.
Now they're implemented as GNU built-in functions that are handled specially.
As a consequence of this change, a program can e.g. declare local
variables with the names of these operators, or, in C++ mode, qualify
the operator names with "::".
Please upgrade to 12.1. There are no more 12.0 updates.
Judy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page