This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: new flag to say when things are instantiated
- To: Brendan Kehoe <brendan at zen dot org>
- Subject: Re: PATCH: new flag to say when things are instantiated
- From: Gabriel Dos Reis <gdr at codesourcery dot com>
- Date: 09 Nov 2000 03:05:46 +0100
- Cc: gcc-bugs at gcc dot gnu dot org
- Organization: CodeSourcery, LLC
- References: <3A09B3CE.6050500@zen.org>
Brendan Kehoe <brendan@zen.org> writes:
| I've found this feature to be particularly helpful in some situations. By
| making it possible for users to know precisely when the compiler is doing
| something for them, it can both help new C++ developers grasp the language
| better, and also help you know when seemingly obscure bugs happen due to a
| random instantiation you didn't know about.
Your proposed option might indeed be helpful in diagnostics about template.
I think the diagnostics should be more descriptive, insisting on the
fact that an instanciation is implicit or explicit. For function
templates and static data member of class templates, we should
distinguish between "declaration instanciation" and "definition
instanciation". According to standard terminology, it is technically
incorrect to speak of "variable instanciation".
-- Gaby
CodeSourcery, LLC http://www.codesourcery.com