Skip to content
Snippets Groups Projects
Commit 13f97ca3 authored by Paul Robinson's avatar Paul Robinson
Browse files

Guard __gnuc_va_list typedef.

Differential Revision: http://reviews.llvm.org/D28620


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@292819 91177308-0d34-0410-b5e6-96231b3b80d8
parent 425765b6
No related branches found
No related tags found
No related merge requests found
...@@ -43,10 +43,9 @@ typedef __builtin_va_list va_list; ...@@ -43,10 +43,9 @@ typedef __builtin_va_list va_list;
#define va_copy(dest, src) __builtin_va_copy(dest, src) #define va_copy(dest, src) __builtin_va_copy(dest, src)
#endif #endif
/* Hack required to make standard headers work, at least on Ubuntu */
#ifndef __GNUC_VA_LIST #ifndef __GNUC_VA_LIST
#define __GNUC_VA_LIST 1 #define __GNUC_VA_LIST 1
#endif
typedef __builtin_va_list __gnuc_va_list; typedef __builtin_va_list __gnuc_va_list;
#endif
#endif /* __STDARG_H */ #endif /* __STDARG_H */
// 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>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment