This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: PATCH: new flag to say when things are instantiated


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]