[PATCH] D137268: [clang][Headers] Do not define varargs macros for __need___va_list
Adhemerval Zanella via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 8 09:21:26 PST 2022
zatrazz marked 2 inline comments as done.
zatrazz added inline comments.
================
Comment at: clang/lib/Headers/stdarg.h:17
+#ifndef __GNUC_VA_LIST
+#define __GNUC_VA_LIST 1
+typedef __builtin_va_list __gnuc_va_list;
----------------
MaskRay wrote:
> To match gcc stdarg.h, `#define __GNUC_VA_LIST`
Ack.
================
Comment at: clang/lib/Headers/stdarg.h:21
+
+#ifdef __STDARG_H
----------------
efriedma wrote:
> Maybe the following is a little more readable?
>
> ```
> #ifndef __STDARG_H
>
> #ifndef __GNUC_VA_LIST
> #define __GNUC_VA_LIST 1
> typedef __builtin_va_list __gnuc_va_list;
> #endif
>
> #ifdef __need___va_list
> #undef __need___va_list
> #else
> #define __STDARG_H
> [...]
> ```
Ack.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137268/new/
https://reviews.llvm.org/D137268
More information about the cfe-commits
mailing list