lex_floating.c revision 1.2
11.2Srillig/* $NetBSD: lex_floating.c,v 1.2 2022/01/15 14:22:03 rillig Exp $ */ 21.1Srillig# 3 "lex_floating.c" 31.1Srillig 41.1Srillig/* 51.1Srillig * Tests for lexical analysis of floating constants. 61.1Srillig * 71.1Srillig * C99 6.4.4.2 "Floating constants" 81.1Srillig */ 91.1Srillig 101.1Srilligvoid sinkf(float); 111.1Srilligvoid sinkd(double); 121.1Srilligvoid sinkl(long double); 131.1Srillig 141.1Srilligvoid 151.1Srilligtest_float(void) 161.1Srillig{ 171.1Srillig sinkf(0.0F); 181.1Srillig sinkf(0.0f); 191.1Srillig sinkf(-0.0F); 201.1Srillig sinkf(-0.0f); 211.1Srillig} 221.1Srillig 231.1Srilligvoid 241.1Srilligtest_double(void) 251.1Srillig{ 261.1Srillig // https://bugs.java.com/bugdatabase/view_bug.do?bug_id=4396272 271.1Srillig sinkd(2.2250738585072012e-308); 281.2Srillig /* expect+1: error: syntax error 'x' [249] */ 291.2Srillig sinkd(1.23x); 301.1Srillig} 311.1Srillig 321.1Srilligvoid 331.1Srilligtest_long_double(void) 341.1Srillig{ 351.1Srillig sinkl(2.2250738585072012e-308L); 361.1Srillig} 37