Home | History | Annotate | Line # | Download | only in lint1
c90.c revision 1.3.2.1
      1  1.3.2.1  perseant /*	$NetBSD: c90.c,v 1.3.2.1 2025/08/02 05:58:14 perseant Exp $	*/
      2      1.1    rillig # 3 "c90.c"
      3      1.1    rillig 
      4      1.1    rillig /*
      5      1.1    rillig  * Tests for the option -s, which allows features from C90, but neither any
      6      1.1    rillig  * later C standards nor GNU extensions.
      7      1.1    rillig  */
      8      1.1    rillig 
      9      1.2    rillig /* lint1-flags: -sw -X 351 */
     10      1.1    rillig 
     11      1.3    rillig /* expect+1: error: C90 to C17 require formal parameter before '...' [84] */
     12      1.1    rillig void varargs_function(...);
     13  1.3.2.1  perseant 
     14  1.3.2.1  perseant int
     15  1.3.2.1  perseant compound_literal(void)
     16  1.3.2.1  perseant {
     17  1.3.2.1  perseant 	/* expect+1: error: compound literals are a C99/GCC extension [319] */
     18  1.3.2.1  perseant 	return (int){123};
     19  1.3.2.1  perseant }
     20