diff options
author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-11-01 15:31:12 +0000 |
---|---|---|
committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-11-01 15:31:12 +0000 |
commit | 8c37d3591562e19a7820e8d8c1186f9e5e5f9d60 (patch) | |
tree | 3a0a70e9966b269f5ebf022b1b4791ced82f6bd8 /gcc/c-decl.c | |
parent | 4caff2085622c6813fdbfa4b6a1041f097121454 (diff) | |
download | gcc-8c37d3591562e19a7820e8d8c1186f9e5e5f9d60.tar.gz |
gcc
* c-decl.c (grokdeclarator): Set decl source locations.
* c-parser.c (c_parser_enum_specifier): Set location.
(c_parser_struct_or_union_specifier): Likewise.
gcc/testsuite
* gcc.dg/redecl-1.c: Update.
* gcc.dg/pr20368-3.c: Update.
* gcc.dg/inline-14.c: Update.
* gcc.dg/builtins-30.c: Update.
* gcc.dg/dremf-type-compat-4.c: Update.
* gcc.dg/pr20368-2.c: Update.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@129822 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r-- | gcc/c-decl.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 1152253e2e2..5ddbcc0772a 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -4645,6 +4645,7 @@ grokdeclarator (const struct c_declarator *declarator, if (type_quals) type = c_build_qualified_type (type, type_quals); decl = build_decl (TYPE_DECL, declarator->u.id, type); + DECL_SOURCE_LOCATION (decl) = declarator->id_loc; if (declspecs->explicit_signed_p) C_TYPEDEF_EXPLICITLY_SIGNED (decl) = 1; if (declspecs->inline_p) @@ -4740,6 +4741,7 @@ grokdeclarator (const struct c_declarator *declarator, type_as_written = type; decl = build_decl (PARM_DECL, declarator->u.id, type); + DECL_SOURCE_LOCATION (decl) = declarator->id_loc; if (size_varies) C_DECL_VARIABLE_SIZE (decl) = 1; @@ -4779,6 +4781,7 @@ grokdeclarator (const struct c_declarator *declarator, } type = c_build_qualified_type (type, type_quals); decl = build_decl (FIELD_DECL, declarator->u.id, type); + DECL_SOURCE_LOCATION (decl) = declarator->id_loc; DECL_NONADDRESSABLE_P (decl) = bitfield; if (bitfield && !declarator->u.id) TREE_NO_WARNING (decl) = 1; @@ -4815,6 +4818,7 @@ grokdeclarator (const struct c_declarator *declarator, } decl = build_decl (FUNCTION_DECL, declarator->u.id, type); + DECL_SOURCE_LOCATION (decl) = declarator->id_loc; decl = build_decl_attribute_variant (decl, decl_attr); if (pedantic && type_quals && !DECL_IN_SYSTEM_HEADER (decl)) |