forked from OSchip/llvm-project
Guard __gnuc_va_list typedef.
Differential Revision: http://reviews.llvm.org/D28620 llvm-svn: 292819
This commit is contained in:
parent
7b49ad74ed
commit
a363d14538
|
@ -43,10 +43,9 @@ typedef __builtin_va_list va_list;
|
|||
#define va_copy(dest, src) __builtin_va_copy(dest, src)
|
||||
#endif
|
||||
|
||||
/* Hack required to make standard headers work, at least on Ubuntu */
|
||||
#ifndef __GNUC_VA_LIST
|
||||
#define __GNUC_VA_LIST 1
|
||||
#endif
|
||||
typedef __builtin_va_list __gnuc_va_list;
|
||||
#endif
|
||||
|
||||
#endif /* __STDARG_H */
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
// RUN: %clang_cc1 -fsyntax-only -verify -Wsystem-headers -std=c99 %s
|
||||
// expected-no-diagnostics
|
||||
|
||||
// Check that no warnings are emitted from stdarg.h if __gnuc_va_list has
|
||||
// previously been defined in another header file.
|
||||
typedef __builtin_va_list __va_list;
|
||||
typedef __va_list __gnuc_va_list;
|
||||
#define __GNUC_VA_LIST
|
||||
|
||||
#include <stdarg.h>
|
Loading…
Reference in New Issue