Index: clang/lib/Headers/intrin.h =================================================================== --- clang/lib/Headers/intrin.h +++ clang/lib/Headers/intrin.h @@ -97,8 +97,9 @@ unsigned int __readdr(unsigned int); #ifdef __i386__ unsigned char __readfsbyte(unsigned long); -unsigned __int64 __readfsqword(unsigned long); unsigned short __readfsword(unsigned long); +unsigned long __readfsdword(unsigned long); +unsigned __int64 __readfsqword(unsigned long); #endif unsigned __int64 __readmsr(unsigned long); unsigned __int64 __readpmc(unsigned long); Index: clang/test/CodeGen/X86/ms-x86-intrinsics.c =================================================================== --- clang/test/CodeGen/X86/ms-x86-intrinsics.c +++ clang/test/CodeGen/X86/ms-x86-intrinsics.c @@ -1,10 +1,12 @@ -// RUN: %clang_cc1 -ffreestanding -fms-extensions -fms-compatibility -fms-compatibility-version=17.00 \ +// RUN: %clang_cc1 -Werror -ffreestanding -fms-extensions -fms-compatibility -fms-compatibility-version=17.00 \ // RUN: -triple i686--windows -Oz -emit-llvm %s -o - \ // RUN: | FileCheck %s -check-prefix=CHECK -check-prefix=CHECK-I386 -// RUN: %clang_cc1 -ffreestanding -fms-extensions -fms-compatibility -fms-compatibility-version=17.00 \ +// RUN: %clang_cc1 -Werror -ffreestanding -fms-extensions -fms-compatibility -fms-compatibility-version=17.00 \ // RUN: -triple x86_64--windows -Oz -emit-llvm %s -o - \ // RUN: | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-X64 +#include + #if defined(__i386__) char test__readfsbyte(unsigned long Offset) { return __readfsbyte(++Offset);