1 /* $NetBSD: msg_177.c,v 1.5 2025/02/24 19:49:00 rillig Exp $ */ 2 # 3 "msg_177.c" 3 4 // Test for message: non-constant initializer [177] 5 6 /* lint1-extra-flags: -X 351 */ 7 8 extern int function(void); 9 10 static const int not_a_constant = 13; 11 12 /* expect+1: error: non-constant initializer [177] */ 13 const int var = not_a_constant; 14 15 /* expect+1: error: non-constant initializer [177] */ 16 const int calling_function = function(); 17 18 // A compound expression is not a constant expression. 19 /* expect+1: error: non-constant initializer [177] */ 20 const int compound_expression = (int){ 3 }; 21