msg_005.c revision 1.6
11.6Srillig/*	$NetBSD: msg_005.c,v 1.6 2024/05/04 06:52:17 rillig Exp $	*/
21.1Srillig# 3 "msg_005.c"
31.1Srillig
41.1Srillig// Test for message: modifying typedef with '%s'; only qualifiers allowed [5]
51.1Srillig
61.6Srilligtypedef char char_alias;
71.6Srilligtypedef signed char schar_alias;
81.6Srilligtypedef unsigned char uchar_alias;
91.6Srilligtypedef short short_alias;
101.6Srilligtypedef unsigned short ushort_alias;
111.6Srilligtypedef int int_alias;
121.6Srilligtypedef unsigned int uint_alias;
131.6Srilligtypedef long long_alias;
141.6Srilligtypedef unsigned long ulong_alias;
151.6Srilligtypedef long long llong_alias;
161.6Srilligtypedef unsigned long long ullong_alias;
171.6Srilligtypedef float float_alias;
181.6Srilligtypedef double double_alias;
191.6Srilligtypedef long double ldouble_alias;
201.6Srilligtypedef float _Complex fcomplex_alias;
211.6Srilligtypedef double _Complex dcomplex_alias;
221.6Srilligtypedef long double _Complex lcomplex_alias;
231.4Srillig
241.4Srillig/* expect+1: warning: modifying typedef with 'signed'; only qualifiers allowed [5] */
251.6Srilligtypedef char_alias signed err_s_char;
261.6Srillig/* expect+1: warning: modifying typedef with 'unsigned'; only qualifiers allowed [5] */
271.6Srilligtypedef char_alias unsigned err_u_char;
281.6Srillig/* expect+1: error: illegal type combination [4] */
291.6Srilligtypedef schar_alias signed err_s_schar;
301.6Srillig/* expect+1: error: illegal type combination [4] */
311.6Srilligtypedef schar_alias unsigned err_u_schar;
321.6Srillig/* expect+1: error: illegal type combination [4] */
331.6Srilligtypedef uchar_alias signed err_s_uchar;
341.6Srillig/* expect+1: error: illegal type combination [4] */
351.6Srilligtypedef uchar_alias unsigned err_u_uchar;
361.6Srillig/* expect+1: warning: modifying typedef with 'signed'; only qualifiers allowed [5] */
371.6Srilligtypedef short_alias signed err_s_short;
381.6Srillig/* expect+1: warning: modifying typedef with 'unsigned'; only qualifiers allowed [5] */
391.6Srilligtypedef short_alias unsigned err_u_short;
401.6Srillig/* expect+1: error: illegal type combination [4] */
411.6Srilligtypedef ushort_alias signed err_s_ushort;
421.6Srillig/* expect+1: error: illegal type combination [4] */
431.6Srilligtypedef ushort_alias unsigned err_u_ushort;
441.6Srillig/* expect+1: warning: modifying typedef with 'signed'; only qualifiers allowed [5] */
451.6Srilligtypedef int_alias signed err_s_int;
461.6Srillig/* expect+1: warning: modifying typedef with 'unsigned'; only qualifiers allowed [5] */
471.6Srilligtypedef int_alias unsigned err_u_int;
481.6Srillig/* expect+1: error: illegal type combination [4] */
491.6Srilligtypedef uint_alias signed err_s_uint;
501.6Srillig/* expect+1: error: illegal type combination [4] */
511.6Srilligtypedef uint_alias unsigned err_u_uint;
521.6Srillig/* expect+1: warning: modifying typedef with 'signed'; only qualifiers allowed [5] */
531.6Srilligtypedef long_alias signed err_s_long;
541.6Srillig/* expect+1: warning: modifying typedef with 'unsigned'; only qualifiers allowed [5] */
551.6Srilligtypedef long_alias unsigned err_u_long;
561.6Srillig/* expect+1: error: illegal type combination [4] */
571.6Srilligtypedef ulong_alias signed err_s_ulong;
581.6Srillig/* expect+1: error: illegal type combination [4] */
591.6Srilligtypedef ulong_alias unsigned err_u_ulong;
601.6Srillig/* expect+1: warning: modifying typedef with 'signed'; only qualifiers allowed [5] */
611.6Srilligtypedef llong_alias signed err_s_llong;
621.4Srillig/* expect+1: warning: modifying typedef with 'unsigned'; only qualifiers allowed [5] */
631.6Srilligtypedef llong_alias unsigned err_u_llong;
641.6Srillig/* expect+1: error: illegal type combination [4] */
651.6Srilligtypedef ullong_alias signed err_s_ullong;
661.6Srillig/* expect+1: error: illegal type combination [4] */
671.6Srilligtypedef ullong_alias unsigned err_u_ullong;
681.6Srillig/* expect+1: error: illegal type combination [4] */
691.6Srilligtypedef float_alias signed err_s_float;
701.6Srillig/* expect+1: error: illegal type combination [4] */
711.6Srilligtypedef float_alias unsigned err_u_float;
721.6Srillig/* expect+1: error: illegal type combination [4] */
731.6Srilligtypedef double_alias signed err_s_double;
741.6Srillig/* expect+1: error: illegal type combination [4] */
751.6Srilligtypedef double_alias unsigned err_u_double;
761.6Srillig/* expect+1: error: illegal type combination [4] */
771.6Srilligtypedef ldouble_alias signed err_s_ldouble;
781.6Srillig/* expect+1: error: illegal type combination [4] */
791.6Srilligtypedef ldouble_alias unsigned err_u_ldouble;
801.6Srillig/* expect+1: error: illegal type combination [4] */
811.6Srilligtypedef fcomplex_alias signed err_s_fcomplex;
821.6Srillig/* expect+1: error: illegal type combination [4] */
831.6Srilligtypedef fcomplex_alias unsigned err_u_fcomplex;
841.6Srillig/* expect+1: error: illegal type combination [4] */
851.6Srilligtypedef dcomplex_alias signed err_s_dcomplex;
861.6Srillig/* expect+1: error: illegal type combination [4] */
871.6Srilligtypedef dcomplex_alias unsigned err_u_dcomplex;
881.6Srillig/* expect+1: error: illegal type combination [4] */
891.6Srilligtypedef lcomplex_alias signed err_s_lcomplex;
901.6Srillig/* expect+1: error: illegal type combination [4] */
911.6Srilligtypedef lcomplex_alias unsigned err_u_lcomplex;
921.4Srillig
931.4Srillig/* expect+1: warning: modifying typedef with 'short'; only qualifiers allowed [5] */
941.6Srilligtypedef int_alias short err_short_int;
951.6Srillig/* expect+1: error: illegal type combination [4] */
961.6Srilligtypedef long_alias short err_short_long;
971.6Srillig/* expect+1: error: illegal type combination [4] */
981.6Srilligtypedef float_alias short err_short_float;
991.6Srillig
1001.6Srillig/* expect+1: error: illegal type combination [4] */
1011.6Srilligtypedef char_alias long err_l_char;
1021.6Srillig/* expect+1: error: illegal type combination [4] */
1031.6Srilligtypedef schar_alias long err_l_schar;
1041.6Srillig/* expect+1: error: illegal type combination [4] */
1051.6Srilligtypedef uchar_alias long err_l_uchar;
1061.6Srillig/* expect+1: error: illegal type combination [4] */
1071.6Srilligtypedef short_alias long err_l_short;
1081.6Srillig/* expect+1: error: illegal type combination [4] */
1091.6Srilligtypedef ushort_alias long err_l_ushort;
1101.6Srillig/* expect+1: warning: modifying typedef with 'long'; only qualifiers allowed [5] */
1111.6Srilligtypedef int_alias long err_l_int;
1121.6Srillig/* expect+1: warning: modifying typedef with 'long'; only qualifiers allowed [5] */
1131.6Srilligtypedef uint_alias long err_l_uint;
1141.6Srillig/* expect+1: warning: modifying typedef with 'long'; only qualifiers allowed [5] */
1151.6Srilligtypedef long_alias long err_l_long;
1161.6Srillig/* expect+1: warning: modifying typedef with 'long'; only qualifiers allowed [5] */
1171.6Srilligtypedef ulong_alias long err_l_ulong;
1181.6Srillig/* expect+1: error: illegal type combination [4] */
1191.6Srilligtypedef llong_alias long err_l_llong;
1201.6Srillig/* expect+1: error: illegal type combination [4] */
1211.6Srilligtypedef ullong_alias long err_l_ullong;
1221.6Srillig/* expect+1: warning: modifying typedef with 'long'; only qualifiers allowed [5] */
1231.6Srilligtypedef float_alias long err_l_float;
1241.6Srillig/* expect+1: warning: modifying typedef with 'long'; only qualifiers allowed [5] */
1251.6Srilligtypedef double_alias long err_l_double;
1261.6Srillig/* expect+1: error: illegal type combination [4] */
1271.6Srilligtypedef ldouble_alias long err_l_ldouble;
1281.6Srillig/* expect+1: error: illegal type combination [4] */
1291.6Srilligtypedef fcomplex_alias long err_l_fcomplex;
1301.6Srillig/* expect+1: warning: modifying typedef with 'long'; only qualifiers allowed [5] */
1311.6Srilligtypedef dcomplex_alias long err_l_dcomplex;
1321.6Srillig/* expect+1: error: illegal type combination [4] */
1331.6Srilligtypedef lcomplex_alias long err_l_lcomplex;
1341.4Srillig
1351.4Srillig
1361.4Srillig/*
1371.6Srillig * If the type qualifier comes before the type name, which would be the
1381.6Srillig * natural order, the type name is interpreted as a new name, not as the one
1391.6Srillig * referring to the typedef.  This makes the above type modifications even
1401.6Srillig * more unlikely to be accidentally seen in practice.
1411.4Srillig */
1421.4Srillig/* expect+1: error: syntax error 'prefix_long_number' [249] */
1431.6Srilligtypedef long int_alias prefix_long_number;
1441.4Srillig
1451.4Srillig/* Type qualifiers are OK. */
1461.6Srilligtypedef int_alias const const_int;
147