https://bugs.llvm.org/show_bug.cgi?id=51542
Bug ID: 51542
Summary: Clang on Windows: under FE_UPWARD printf(“%.1f\n”,
0.0) prints 0.1 instead of 0.0
Product: clang
Version: 12.0
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: C
Assignee: unassignedclangb...@nondot.org
Reporter: pavel.moroz...@gmail.com
CC: blitzrak...@gmail.com, dgre...@apple.com,
erik.pilking...@gmail.com, llvm-bugs@lists.llvm.org,
richard-l...@metafoo.co.uk
Sample code (t928.c):
#include <stdio.h>
#include <fenv.h>
#pragma fenv_access (on)
int main(void)
{
int i = fesetround( FE_UPWARD );
if ( ! i )
{
printf( "%.1f\n", 0.0 );
}
return 0;
}
Invocation: clang t928.c -Wall -Wextra -std=c11 -ffp-model=strict -pedantic &&
./a.exe
Expected output: 0.0
Actual output: 0.1
Tool version: 12.0.0
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs