2023-03-28 17:44:34 +03:00
|
|
|
/* $NetBSD: msg_301.c,v 1.4 2023/03/28 14:44:35 rillig Exp $ */
|
2021-01-02 13:22:42 +03:00
|
|
|
# 3 "msg_301.c"
|
|
|
|
|
|
|
|
// Test for message: array of incomplete type [301]
|
2022-06-17 09:59:16 +03:00
|
|
|
// This message is not used.
|
|
|
|
// TODO: This message occurs in the code but is deactivated.
|
2021-01-02 13:22:42 +03:00
|
|
|
|
2023-03-28 17:44:34 +03:00
|
|
|
/* lint1-extra-flags: -X 351 */
|
|
|
|
|
2022-06-17 09:59:16 +03:00
|
|
|
/* expect+1: warning: struct 'incomplete' never defined [233] */
|
|
|
|
struct incomplete;
|
|
|
|
|
|
|
|
/* expect+1: error: 'var' has incomplete type 'incomplete struct incomplete' [31] */
|
|
|
|
struct incomplete var[3];
|
|
|
|
|
|
|
|
/* expect+1: error: cannot take size/alignment of incomplete type [143] */
|
|
|
|
unsigned long sizeof_3 = sizeof(struct incomplete[3]);
|