Home | History | Annotate | Line # | Download | only in lint1
msg_014.c revision 1.6
      1 /*	$NetBSD: msg_014.c,v 1.6 2022/05/12 00:09:44 rillig Exp $	*/
      2 # 3 "msg_014.c"
      3 
      4 // Test for message: compiler takes alignment of function [14]
      5 /* This message is not used. */
      6 
      7 typedef void function(void);
      8 
      9 /* FIXME: '__alignof__' must be recognized. */
     10 /* expect+2: error: function '__alignof__' implicitly declared to return int [215] */
     11 /* expect+1: error: syntax error 'function' [249] */
     12 unsigned long alignof_function = __alignof__(function);
     13 
     14 struct illegal_bit_field {
     15 	/* expect+1: warning: illegal bit-field type 'function(void) returning void' [35] */
     16 	function bit_field:1;
     17 	/* expect+1: error: function illegal in structure or union [38] */
     18 	function member;
     19 };
     20 
     21 struct s {
     22 	/* expect+1: error: array of function is illegal [16] */
     23 	function member[5];
     24 };
     25