aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-decl.c
diff options
context:
space:
mode:
authorAldy Hernandez <aldyh@gcc.gnu.org>2008-08-21 17:50:01 +0000
committerAldy Hernandez <aldyh@gcc.gnu.org>2008-08-21 17:50:01 +0000
commit3d10ed6cbc7248d756077c1e7dc3533257c44a4f (patch)
treea0c100e51cbbf0a73555687afb760c911a5d2f78 /gcc/c-decl.c
parenteb5712c966473f563c24c8749e1f96d3acb671a2 (diff)
downloadgcc-3d10ed6cbc7248d756077c1e7dc3533257c44a4f.zip
gcc-3d10ed6cbc7248d756077c1e7dc3533257c44a4f.tar.gz
gcc-3d10ed6cbc7248d756077c1e7dc3533257c44a4f.tar.bz2
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
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r--gcc/c-decl.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index 857e3f2..056cb38 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -5363,12 +5363,15 @@ start_struct (enum tree_code code, tree name)
WIDTH is non-NULL for bit-fields only, and is an INTEGER_CST node.
DECL_ATTRS is as for grokdeclarator.
+ LOC is the location of the structure component.
+
This is done during the parsing of the struct declaration.
The FIELD_DECL nodes are chained together and the lot of them
are ultimately passed to `build_struct' to make the RECORD_TYPE node. */
tree
-grokfield (struct c_declarator *declarator, struct c_declspecs *declspecs,
+grokfield (location_t loc,
+ struct c_declarator *declarator, struct c_declspecs *declspecs,
tree width, tree *decl_attrs)
{
tree value;
@@ -5414,10 +5417,10 @@ grokfield (struct c_declarator *declarator, struct c_declspecs *declspecs,
}
if (!ok)
{
- pedwarn (input_location, 0, "declaration does not declare anything");
+ pedwarn (loc, 0, "declaration does not declare anything");
return NULL_TREE;
}
- pedwarn (input_location, OPT_pedantic, "ISO C doesn%'t support unnamed structs/unions");
+ pedwarn (loc, OPT_pedantic, "ISO C doesn%'t support unnamed structs/unions");
}
value = grokdeclarator (declarator, declspecs, FIELD, false,