Extensionless headers

Phil Edwards pedwards@disaster.jaj.com
Tue Jan 8 17:31:00 GMT 2002


On Wed, Jan 09, 2002 at 01:08:00AM +0000, Nathan Myers wrote:
> On Tue, Jan 08, 2002 at 07:18:32PM -0500, Phil Edwards wrote:
> > This is a red herring.  We already maintain such a list; it's in the
> > compiler.  We manipulate it with -I options.
> 
> But where can all the scripts we use get this list?

Before installation?  See testsuite_flags in the build directory.

After installation?  Dunno, never needed to.  Last time I counted, cpplib
has 1.7 billion useful options (and three useless ones); some of those
might print the include paths.


> We're all developers here.  Users who don't look at the libstc++ source
> tree have less need to run scripts over it.  Still, I often do find/grep
> in /usr/include for symbols of interest.  It is very common, and no 
> amount of documentation can eliminate the need for it.  Telling users
> they cannot do their searches the normal way is rude.

To clarify:  are you trying to fix the installed case, or the "internal
libstdc++ developers" case?

For the *installed* case, none of the options presented so far will help.
The only solution there, as I see it, is to install the headers as std_foo.h
(or whatever) and teach cpplib about the list of standard headers -- i.e.,
to take advantage of the loophole the LWG specifically left open for us.

That's a more adventurous change, one I'm not presently suggesting.


> We have std/ on the -I path, so anything you put in there is exposed
> as-is (i.e., <std_string.h>

No we don't.  Look again.  Look at the generated testsuite_files script,
for example.

We create a staged 'include' tree.  /That/ directory is on the -I path,
/that/ directory is what would get installed.  And under my proposal,
/that/ directory would contain the official names.


> I would like to move further away from naming that is reserved to users; 
> it bothers me that we have "bits" and "ext", which user programs being
> ported might already have used for their own purposes.

Quite possibly.  But that's a different problem, to be solved another day.


Phil

-- 
If ye love wealth greater than liberty, the tranquility of servitude greater
than the animating contest for freedom, go home and leave us in peace.  We seek
not your counsel, nor your arms.  Crouch down and lick the hand that feeds you;
and may posterity forget that ye were our countrymen.            - Samuel Adams



More information about the Libstdc++ mailing list