summaryrefslogtreecommitdiff
path: root/gcc/c-parser.c
diff options
context:
space:
mode:
authoraldyh <aldyh@138bc75d-0d04-0410-961f-82ee72b054a4>2008-08-21 17:50:01 +0000
committeraldyh <aldyh@138bc75d-0d04-0410-961f-82ee72b054a4>2008-08-21 17:50:01 +0000
commitd520c1f285d9b63020e133febcb559728e21f580 (patch)
treea0c100e51cbbf0a73555687afb760c911a5d2f78 /gcc/c-parser.c
parent4e70a0f3af2b330925480f0c7ef7e6462521e569 (diff)
downloadgcc-d520c1f285d9b63020e133febcb559728e21f580.tar.gz
* c-tree.h (grokfield): New argument.
* c-decl.c (grokfield): Handle new location argument. * c-parser.c (c_parser_struct_declaration): Pass location to grokfield. testsuite/ * gcc.dg/20011008-1.c: Test column. * gcc.dg/20080820.c: New. * gcc.dg/fltconst-1.c: Test column. * gcc.dg/cpp/cpp.exp: Add -fno-show-column. * gcc.dg/cpp/trad/trad.exp: Same. * lib/gcc.exp (gcc_target_compile): Remove -fno-show-column. * lib/gcc-dg.exp (process-message): Handle columns. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@139403 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-parser.c')
-rw-r--r--gcc/c-parser.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/c-parser.c b/gcc/c-parser.c
index 7b7d8693332..e69b0a73869 100644
--- a/gcc/c-parser.c
+++ b/gcc/c-parser.c
@@ -1960,7 +1960,9 @@ c_parser_struct_declaration (c_parser *parser)
structs or unions (which is [a] useful and [b] supports
MS P-SDK). */
tree attrs = NULL;
- ret = grokfield (build_id_declarator (NULL_TREE), specs,
+
+ ret = grokfield (c_parser_peek_token (parser)->location,
+ build_id_declarator (NULL_TREE), specs,
NULL_TREE, &attrs);
if (ret)
decl_attributes (&ret, attrs, 0);
@@ -2003,7 +2005,8 @@ c_parser_struct_declaration (c_parser *parser)
}
if (c_parser_next_token_is_keyword (parser, RID_ATTRIBUTE))
postfix_attrs = c_parser_attributes (parser);
- d = grokfield (declarator, specs, width, &all_prefix_attrs);
+ d = grokfield (c_parser_peek_token (parser)->location,
+ declarator, specs, width, &all_prefix_attrs);
decl_attributes (&d, chainon (postfix_attrs,
all_prefix_attrs), 0);
TREE_CHAIN (d) = decls;