crash16.C: Function name is the correct location for an error regarding a function.
authorAldy Hernandez <aldyh@redhat.com>
Mon, 15 Sep 2008 22:24:18 +0000 (22:24 +0000)
committerAldy Hernandez <aldyh@gcc.gnu.org>
Mon, 15 Sep 2008 22:24:18 +0000 (22:24 +0000)
commit402b8cf659febc5377dc1680d35a60060ed72799
treec7fecdbe7fcb04db014bde6d44be92149b600735
parent0eeb22402c9694e375f3a2b9113bcf94d30205cf
crash16.C: Function name is the correct location for an error regarding a function.

testsuite/
        * g++.old-deja/g++.brendan/crash16.C: Function name is the correct
        location for an error regarding a function.
        * g++.old-deja/g++.other/pmf3.C: Same.
        * g++.old-deja/g++.law/ctors5.C: Same.
        * g++.old-deja/g++.pt/explicit34.C: Same.
        * g++.dg/parse/error28.C: Same.
        * g++.dg/parse/error17.C: Same.
        * g++.dg/template/friend44.C: Same.
cp/
        * decl.c (duplicate_decls): Call error_at.
        (grokfndecl): New location argument.  Use location if available.
        (grokdeclarator): Pass declarator location to grokfndecl.
        * cp-tree.h (struct cp_declarator): Update comment for id_loc.
        * decl2.c (check_classfn): Use error_at.
        * parser.c (cp_parser_init_declarator): Set function_start_locus
        to brace location.
        (cp_parser_member_declaration): Set id_loc for function declarators.

From-SVN: r140379
13 files changed:
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/decl.c
gcc/cp/decl2.c
gcc/cp/parser.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/parse/error17.C
gcc/testsuite/g++.dg/parse/error28.C
gcc/testsuite/g++.dg/template/friend44.C
gcc/testsuite/g++.old-deja/g++.brendan/crash16.C
gcc/testsuite/g++.old-deja/g++.law/ctors5.C
gcc/testsuite/g++.old-deja/g++.other/pmf3.C
gcc/testsuite/g++.old-deja/g++.pt/explicit34.C