-
Tom Anderson authored
"Some compilers offer an extension that allows ## to appear after a comma and before __VA_ARGS__, in which case the ## does nothing when the variable arguments are present, but removes the comma when the variable arguments are not present: this makes it possible to define macros such as fprintf (stderr, format, ##__VA_ARGS__)" [1] This is problematic for Chromium since ##__VA_ARGS__ doesn't swallow the preceding comma in standards-compliant mode on gcc [2]. Since we use this feature in Chromium (eg base), switch the gcc config back to -std=gnu*. C++20 adds a standards-compliant macro called __VA_OPT__ that we can use to replicate the behavior of ##__VA_ARGS__ when we eventually enable it. [1] https://en.cppreference.com/w/cpp/preprocessor/replace [2] https://github.com/gcc-mirror/gcc/blob/6d6279f88e9678c458bc22ea3be03e73f462f9e7/libcpp/macro.c#L1167 R=thakis Change-Id: I6c0f3e64ad21b6270822011733d44098537b8f02 Reviewed-on: https://chromium-review.googlesource.com/1181657Reviewed-by:
Nico Weber <thakis@chromium.org> Reviewed-by:
Sergiy Byelozyorov <sergiyb@chromium.org> Reviewed-by:
Dirk Pranke <dpranke@chromium.org> Commit-Queue: Thomas Anderson <thomasanderson@chromium.org> Cr-Commit-Position: refs/heads/master@{#584562}
af5475b8