From 3d10ed6cbc7248d756077c1e7dc3533257c44a4f Mon Sep 17 00:00:00 2001 From: Aldy Hernandez Date: Thu, 21 Aug 2008 17:50:01 +0000 Subject: c-tree.h (grokfield): New argument. * 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. From-SVN: r139403 --- gcc/c-parser.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'gcc/c-parser.c') diff --git a/gcc/c-parser.c b/gcc/c-parser.c index 7b7d869..e69b0a7 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; -- cgit v1.1