From 4886e32e1f0bc778a47d23ac88a9c72f2c6305b0 Mon Sep 17 00:00:00 2001 From: Hans Wennborg Date: Tue, 18 Oct 2011 08:58:16 +0000 Subject: [PATCH] Disable the ssize_t test in format-strings-fixit.c. Turns out this part of the test from r142342 wasn't portable. The errors on the bots look like this: E:\bb-win7\cmake-clang-i686-msys\build\tools\clang\test\Sema\Output\format-strings-fixit.c.tmp:58:13: error: conversion specifies type 'unsigned int' but the argument has type 'ssize_t' (aka 'long') printf("%zd", (ssize_t) 42); ~~^ ~~~~~~~~~~~~ %zd Obviously we can't typedef ssize_t to someting that doesn't have the same size as size_t and expect it to work. But it's also weird that the format string "%zd" gets interpreted as "unsigned int" when it should clearly be signed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142345 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Sema/format-strings-fixit.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/Sema/format-strings-fixit.c b/test/Sema/format-strings-fixit.c index 5b2f54a59f..590b2f32f5 100644 --- a/test/Sema/format-strings-fixit.c +++ b/test/Sema/format-strings-fixit.c @@ -48,14 +48,14 @@ void test() { printf("%X", val); typedef __SIZE_TYPE__ size_t; - typedef signed long int ssize_t; + typedef signed long int ssize_t; // FIXME: Figure out the right typedef. typedef __INTMAX_TYPE__ intmax_t; typedef __UINTMAX_TYPE__ uintmax_t; typedef __PTRDIFF_TYPE__ ptrdiff_t; // size_t, etc. printf("%c", (size_t) 42); - printf("%c", (ssize_t) 42); + //printf("%c", (ssize_t) 42); printf("%c", (intmax_t) 42); printf("%c", (uintmax_t) 42); printf("%c", (ptrdiff_t) 42); @@ -82,7 +82,6 @@ void test() { // CHECK: printf("%1$p", (void *)0); // CHECK: printf("%lX", val); // CHECK: printf("%zu", (size_t) 42); -// CHECK: printf("%zd", (ssize_t) 42); // CHECK: printf("%jd", (intmax_t) 42); // CHECK: printf("%ju", (uintmax_t) 42); // CHECK: printf("%td", (ptrdiff_t) 42); -- 2.40.0