2019-05-09 06:01:20 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -triple i686-pc-win32 -fms-compatibility -fms-compatibility-version=17.00 %s
|
2013-09-21 05:12:25 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -triple i386-mingw32 %s
|
2012-04-25 05:27:01 +08:00
|
|
|
|
|
|
|
// Something in MSVC's headers (pulled in e.g. by <crtdefs.h>) defines __null
|
2018-04-06 23:14:32 +08:00
|
|
|
// to something, mimic that.
|
2012-04-25 05:27:01 +08:00
|
|
|
#define __null
|
|
|
|
|
|
|
|
#include <stddef.h>
|
|
|
|
|
|
|
|
// __null is used as a type annotation in MS headers, with __null defined to
|
|
|
|
// nothing in regular builds. This should continue to work even with stddef.h
|
|
|
|
// included.
|
|
|
|
void f(__null void* p) { }
|
|
|
|
|
|
|
|
// NULL should work fine even with __null defined to nothing.
|
|
|
|
void* p = NULL;
|