re PR c++/21280 (#pragma interface, templates, and "inline function used but never...
authorNathan Sidwell <nathan@codesourcery.com>
Thu, 2 Jun 2005 17:52:28 +0000 (17:52 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Thu, 2 Jun 2005 17:52:28 +0000 (17:52 +0000)
commit3e3935a94ce8702a788cd3e76eab584ed09277e8
treea0248ab483fa16d5d61e52a91d59af7f8fbedf6f
parent646221d67de0d8ddfe9b35570c8e52a544e20194
re PR c++/21280 (#pragma interface, templates, and "inline function used but never defined")

cp:
PR c++/21280
* Make-lang.in (method.o): Add diagnostic.h
* decl.c (start_preparsed_function): Use decl's location for file
info.
* decl2.c (cp_finish_file): Set input_location before synthesizing
a function.
(mark_used): When deferring a synthesized function, save current
location.  Do not set function's location when actually
synthesizing it.
* method.c: #include diagnostic.h.
(synthesize_method): Set the functions source location.  Show
needed location if errors are emitted.
testsuite:
PR c++/21280
* g++.dg/opt/interface2.h: New.
* g++.dg/opt/interface2.C: New.
* g++.dg/init/ctor4.C: Adjust error lines.
* g++.old-deja/g++.bob/inherit2.C: Likewise.
* g++.old-deja/g++.bugs/900205_04.C: Likewise.
* g++.old-deja/g++.jason/opeq3.C: Likewise.
* g++.old-deja/g++.pt/assign1.C: Likewise.
* g++.old-deja/g++.pt/crash20.C: Likewise.

From-SVN: r100500
14 files changed:
gcc/cp/ChangeLog
gcc/cp/Make-lang.in
gcc/cp/decl.c
gcc/cp/decl2.c
gcc/cp/method.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/init/ctor4.C
gcc/testsuite/g++.dg/opt/interface2.C [new file with mode: 0644]
gcc/testsuite/g++.dg/opt/interface2.h [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.bob/inherit2.C
gcc/testsuite/g++.old-deja/g++.bugs/900205_04.C
gcc/testsuite/g++.old-deja/g++.jason/opeq3.C
gcc/testsuite/g++.old-deja/g++.pt/assign1.C
gcc/testsuite/g++.old-deja/g++.pt/crash20.C