1 /* $NetBSD: msg_014.c,v 1.9 2025/04/12 15:49:50 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 /* lint1-extra-flags: -X 351 */ 8 9 typedef void function(void); 10 11 /* expect+1: error: cannot take size/alignment of function type 'function(void) returning void' [144] */ 12 unsigned long alignof_function = __alignof__(function); 13 14 struct invalid_bit_field { 15 /* expect+1: warning: invalid bit-field type 'function(void) returning void' [35] */ 16 function bit_field:1; 17 /* expect+1: error: function invalid in structure or union [38] */ 18 function member; 19 }; 20 21 struct s { 22 /* expect+1: error: array of function is invalid [16] */ 23 function member[5]; 24 }; 25