libg++-2.8.1.3 and gcc-20000220 CVS
Gabriel Dos Reis
Gabriel.Dos-Reis@cmla.ens-cachan.fr
Tue Feb 22 01:58:00 GMT 2000
Zack Weinberg <zack@wolery.cumb.org> writes:
| On Tue, Feb 22, 2000 at 12:50:18AM +0100, Gabriel Dos Reis wrote:
| >
| > Actually it would be handful if there were a hook for each _DECL
| > pointing to a list of #included filenames. Then we might define a
| > concept of "abstract header":
| >
| > a header is abstract if it is a system header (or deemed so via a
| > #pragma) or #included by an abstract header.
| >
| > In normal state we'd output the "primary" abstract header for
| > diagnotic purpose and make the debugger know about the full pathname
| > for its needs. IMHO, that will solve the two problems: how
| > to make diagnostics readable and keep the debugger happy.
| >
| > As to how to revert to the old behaviour, a flag will tell us whether
| > we should systematically output absolute pathnames (which is just a
| > list-dump op)
| >
| > cpp would be responsible for providing the header-list.
| >
| > Does it sound feasable to you?
|
| Yes, completely feasible.
|
| The existing information cpplib has about headers is:
| - the full name
| - the short name
| - the directory it was found in
| - whether or not it's a "system" header
|
| and you can walk back up the input stack to see where it was included
| from.
Cool!
| The concept of system headers is not quite the same as your concept of
| abstract headers, but from your definition it sounds like the one can
| be derived from the other.
OK.
| ... What did you have in mind for the #pragma?
I think this feature would be helpful not only for system headers; a
third party library (e.g. v3 :-) may say `#pragma abstract_header' in
its primary header in order to hide its internals.
#ifndef _CPP_COMPLEX
#pragma abstract_header
#include <bits/std_complex.h>
#endif
-- Gaby
More information about the Gcc-bugs
mailing list