diff options
Diffstat (limited to 'gcc/c/c-decl.c')
-rw-r--r-- | gcc/c/c-decl.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/c/c-decl.c b/gcc/c/c-decl.c index a6b7c20..724d193 100644 --- a/gcc/c/c-decl.c +++ b/gcc/c/c-decl.c @@ -5190,6 +5190,8 @@ push_parm_decl (const struct c_parm *parm, tree *expr) decl = grokdeclarator (parm->declarator, parm->specs, PARM, false, NULL, &attrs, expr, NULL, DEPRECATED_NORMAL); + if (decl && DECL_P (decl)) + DECL_SOURCE_LOCATION (decl) = parm->loc; decl_attributes (&decl, attrs, 0); decl = pushdecl (decl); @@ -9700,12 +9702,14 @@ build_void_list_node (void) struct c_parm * build_c_parm (struct c_declspecs *specs, tree attrs, - struct c_declarator *declarator) + struct c_declarator *declarator, + location_t loc) { struct c_parm *ret = XOBNEW (&parser_obstack, struct c_parm); ret->specs = specs; ret->attrs = attrs; ret->declarator = declarator; + ret->loc = loc; return ret; } |