__typeof(t) should not include storage modifiers of t
This commit is contained in:
2
tccgen.c
2
tccgen.c
@ -2948,6 +2948,8 @@ static int parse_btype(CType *type, AttributeDef *ad)
|
|||||||
case TOK_TYPEOF3:
|
case TOK_TYPEOF3:
|
||||||
next();
|
next();
|
||||||
parse_expr_type(&type1);
|
parse_expr_type(&type1);
|
||||||
|
/* remove all storage modifiers except typedef */
|
||||||
|
type1.t &= ~(VT_STORAGE&~VT_TYPEDEF);
|
||||||
goto basic_type2;
|
goto basic_type2;
|
||||||
default:
|
default:
|
||||||
if (typespec_found || typedef_found)
|
if (typespec_found || typedef_found)
|
||||||
|
|||||||
@ -2365,6 +2365,11 @@ extern int weak_asm_v1 asm("weak_asm_v1x") __attribute
|
|||||||
extern int __attribute((weak)) weak_asm_f3(void) asm("weak_asm_f3x") __attribute((weak));
|
extern int __attribute((weak)) weak_asm_f3(void) asm("weak_asm_f3x") __attribute((weak));
|
||||||
extern int weak_asm_v1 asm("weak_asm_v1x") __attribute((weak));
|
extern int weak_asm_v1 asm("weak_asm_v1x") __attribute((weak));
|
||||||
extern int __attribute((weak)) weak_asm_v2 asm("weak_asm_v2x") ;
|
extern int __attribute((weak)) weak_asm_v2 asm("weak_asm_v2x") ;
|
||||||
|
extern int __attribute((weak)) weak_asm_v3(void) asm("weak_asm_v3x") __attribute((weak));
|
||||||
|
|
||||||
|
static const size_t dummy = 0;
|
||||||
|
extern __typeof(dummy) weak_dummy1 __attribute__((weak, alias("dummy")));
|
||||||
|
extern __typeof(dummy) __attribute__((weak, alias("dummy"))) weak_dummy2;
|
||||||
extern __attribute__((weak, alias("dummy"))) __typeof(dummy) weak_dummy3;
|
extern __attribute__((weak, alias("dummy"))) __typeof(dummy) weak_dummy3;
|
||||||
|
|
||||||
void __attribute__((weak)) weak_test(void)
|
void __attribute__((weak)) weak_test(void)
|
||||||
|
|||||||
Reference in New Issue
Block a user