xref: /netbsd-src/tests/usr.bin/xlint/lint1/msg_098.c (revision 53d1339bf7f9c7367b35a9e1ebe693f9b047a47b)
1 /*	$NetBSD: msg_098.c,v 1.4 2021/04/05 01:35:34 rillig Exp $	*/
2 # 3 "msg_098.c"
3 
4 /* Test for message: suffixes F and L are illegal in traditional C [98] */
5 
6 /* lint1-flags: -gtw */
7 
8 void
9 example()
10 {
11 	float f = 1234.5;
12 	float f_F = 1234.5F;		/* expect: 98 */
13 	float f_f = 1234.5f;		/* expect: 98 */
14 
15 	double d = 1234.5;
16 	double d_U = 1234.5U;		/* expect: 249 */
17 
18 	long double ld = 1234.5;	/* expect: 266 */
19 	long double ld_L = 1234.5L;	/* expect: 98 *//* expect: 266 */
20 }
21