diff options
author | aldyh <aldyh@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-09-24 20:00:43 +0000 |
---|---|---|
committer | aldyh <aldyh@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-09-24 20:00:43 +0000 |
commit | e3b80d490390b0b33ef9a5c510029a84ecde6c52 (patch) | |
tree | fd30076c827ad20ea189e2530913b88ff10a6a2d /gcc/c-common.c | |
parent | 56cb6c7d2d7a3839a0002e28213a8939a815b16e (diff) | |
download | gcc-e3b80d490390b0b33ef9a5c510029a84ecde6c52.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@140642 138bc75d-0d04-0410-961f-82ee72b054a4
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 09027bab795..680b9b56651 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; } |