opt_cs.c revision 1.4
11.4Srillig/* $NetBSD: opt_cs.c,v 1.4 2021/11/07 15:44:28 rillig Exp $ */ 21.1Srillig/* $FreeBSD$ */ 31.1Srillig 41.3Srillig/* 51.3Srillig * Tests for the options '-cs' and '-ncs'. 61.3Srillig * 71.3Srillig * The option '-cs' forces a space after the parentheses of a cast. 81.3Srillig * 91.3Srillig * The option '-ncs' removes all whitespace after the parentheses of a cast. 101.3Srillig */ 111.3Srillig 121.1Srillig#indent input 131.1Srilligint i0 = (int)3.0; 141.1Srilligint i1 = (int) 3.0; 151.1Srilligint i3 = (int) 3.0; 161.1Srillig#indent end 171.1Srillig 181.1Srillig#indent run -cs 191.1Srilligint i0 = (int) 3.0; 201.1Srilligint i1 = (int) 3.0; 211.1Srilligint i3 = (int) 3.0; 221.1Srillig#indent end 231.1Srillig 241.1Srillig#indent run -ncs 251.1Srilligint i0 = (int)3.0; 261.1Srilligint i1 = (int)3.0; 271.1Srilligint i3 = (int)3.0; 281.1Srillig#indent end 291.4Srillig 301.4Srillig 311.4Srillig#indent input 321.4Srilligstruct s s3 = (struct s) s; 331.4Srilligstruct s *ptr = (struct s *) s; 341.4Srilligunion u u3 = (union u) u; 351.4Srilligenum e e3 = (enum e) e; 361.4Srillig#indent end 371.4Srillig 381.4Srillig#indent run -cs 391.4Srilligstruct s s3 = (struct s) s; 401.4Srilligstruct s *ptr = (struct s *) s; 411.4Srilligunion u u3 = (union u) u; 421.4Srilligenum e e3 = (enum e) e; 431.4Srillig#indent end 441.4Srillig 451.4Srillig#indent run -ncs 461.4Srilligstruct s s3 = (struct s)s; 471.4Srilligstruct s *ptr = (struct s *)s; 481.4Srilligunion u u3 = (union u)u; 491.4Srilligenum e e3 = (enum e)e; 501.4Srillig#indent end 51