diff options
author | Aldy Hernandez <aldyh@gcc.gnu.org> | 2008-09-24 20:00:43 +0000 |
---|---|---|
committer | Aldy Hernandez <aldyh@gcc.gnu.org> | 2008-09-24 20:00:43 +0000 |
commit | 3ba09659f1ed3ac29f303f42c05e5a8e440964f8 (patch) | |
tree | fd30076c827ad20ea189e2530913b88ff10a6a2d /gcc/c-common.c | |
parent | 19a6a2ea61ebf09360277ba6c0a633dfeead003d (diff) | |
download | gcc-3ba09659f1ed3ac29f303f42c05e5a8e440964f8.zip gcc-3ba09659f1ed3ac29f303f42c05e5a8e440964f8.tar.gz gcc-3ba09659f1ed3ac29f303f42c05e5a8e440964f8.tar.bz2 |
c-common.c (fname_decl): New location argument.
* c-common.c (fname_decl): New location argument.
* c-common.h (fname_decl): Same.
* c-parser.c (c_lex_one_token): Use {warning,error}_at instead of
{warning,error}.
(c_parser_typeof_specifier): Same.
(c_parser_parms_list_declarator): Same.
(c_parser_asm_string_literal): Same.
(c_parser_compound_statement_nostart): Same.
(c_parser_label): Same.
(c_parser_do_statement): Same.
(c_parser_asm_statement): Same.
(c_parser_unary_expression): Same.
(c_parser_sizeof_expression): Same.
(c_parser_postfix_expression): Same.
(c_parser_pragma): Same.
(c_parser_omp_clause_collapse): Same.
(c_parser_omp_clause_num_threads): Same.
(c_parser_omp_clause_schedule): Same.
(c_parser_omp_all_clauses): Same.
(c_parser_omp_sections_scope): Same.
(c_parser_omp_for_loop): Same. Pass condition's location to
c_objc_common_truthvalue_conversion.
(c_parser_enum_specifier): Remove comment.
testsuite/
* gcc.dg/gomp/for-1.c: Test for columns.
* gcc.dg/func-outside-1.c: Same.
* gcc.dg/bitfld-7.c: Same.
cp/
* semantics.c (finish_fname): Pass location to fname_decl.
From-SVN: r140642
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r-- | gcc/c-common.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c index 09027ba..680b9b5 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -988,10 +988,11 @@ fname_as_string (int pretty_p) now. RID indicates how it should be formatted and IDENTIFIER_NODE ID is its name (unfortunately C and C++ hold the RID values of keywords in different places, so we can't derive RID from ID in - this language independent code. */ + this language independent code. LOC is the location of the + function. */ tree -fname_decl (unsigned int rid, tree id) +fname_decl (location_t loc, unsigned int rid, tree id) { unsigned ix; tree decl = NULL_TREE; @@ -1022,7 +1023,7 @@ fname_decl (unsigned int rid, tree id) input_location = saved_location; } if (!ix && !current_function_decl) - pedwarn (input_location, 0, "%qD is not defined outside of function scope", decl); + pedwarn (loc, 0, "%qD is not defined outside of function scope", decl); return decl; } |