Unified · Split
| @@ -2948,6 +2948,8 @@ static int parse_btype(CType *type, AttributeDef *ad) · 2947 unmodified lines | |||
| 2948 | case TOK_TYPEOF3: | 2948 | case TOK_TYPEOF3: |
| 2949 | next(); | 2949 | next(); |
| 2950 | parse_expr_type(&type1); | 2950 | parse_expr_type(&type1); |
| 2951 | /* remove all storage modifiers except typedef */ | ||
| 2952 | type1.t &= ~(VT_STORAGE&~VT_TYPEDEF); | ||
| 2951 | goto basic_type2; | 2953 | goto basic_type2; |
| 2952 | default: | 2954 | default: |
| 2953 | if (typespec_found || typedef_found) | 2955 | if (typespec_found || typedef_found) |
| @@ -2365,6 +2365,11 @@ extern int weak_asm_v1 asm("weak_asm_v1x") __attribute · 2364 unmodified lines | |||
| 2365 | extern int __attribute((weak)) weak_asm_v2 asm("weak_asm_v2x") ; | 2365 | extern int __attribute((weak)) weak_asm_v2 asm("weak_asm_v2x") ; |
| 2366 | extern int __attribute((weak)) weak_asm_v3(void) asm("weak_asm_v3x") __attribute((weak)); | 2366 | extern int __attribute((weak)) weak_asm_v3(void) asm("weak_asm_v3x") __attribute((weak)); |
| 2367 | 2367 | ||
| 2368 | static const size_t dummy = 0; | ||
| 2369 | extern __typeof(dummy) weak_dummy1 __attribute__((weak, alias("dummy"))); | ||
| 2370 | extern __typeof(dummy) __attribute__((weak, alias("dummy"))) weak_dummy2; | ||
| 2371 | extern __attribute__((weak, alias("dummy"))) __typeof(dummy) weak_dummy3; | ||
| 2372 | |||
| 2368 | void __attribute__((weak)) weak_test(void) | 2373 | void __attribute__((weak)) weak_test(void) |
| 2369 | { | 2374 | { |
| 2370 | printf("weak_f1=%d\n", weak_f1 ? weak_f1() : 123); | 2375 | printf("weak_f1=%d\n", weak_f1 ? weak_f1() : 123); |