This is the mail archive of the mailing list for the libstdc++ project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] libstdc++/6720 and libstdc++/6671

Neil Booth <> writes:

| Gabriel Dos Reis wrote:-
| > Nathan Myers <> writes:
| > 
| > [...]
| > 
| > | When you discard the solution, the problems come back.
| > 
| > Certainly.  But we should take care not to cure the symptoms and forget
| > about the problem.  Don't shoot the messenger.  The real problem is
| > elsewhere, and the <ext/xxx> is just exposing something much more
| > deeper, and no it isn't poor naming. 
| > 
| >     #include <cmath>
| >     int main()
| >     {
| >        double x = std::sin(9.8);
| >     }
| > 
| > should not provoque compilation error just because there happens to be
| > a file named cmath in the current directory.  Cure that problem and
| > the symptoms with go away.
| I don't agree with your solution of special-casing certain header names,

It is not me who is special-casing certain header names.  That special
meaning of certain headers are built into the language.  Failure to
provide the expected meaning is failure to implement the language.
Actually, what I'm suggesting is not an invention in the area of
compiler builduing. Existing compilers do deliver that standard
meaning (actually, they have integrated meaning ofthe headers).

The plan for CPP for understanding standard header names is as follow:
  1) if the header name <xxx> is known to be standard then it is
     searched in the appropriate directory

  2) otherwise it is looked up according to the current semantics

  3) a flag can turn on/off behaviour 1) in favor of behaviour 2).

That is no over-specification.  At any rate, the compiler should
deliver the standard semantics of <xxx.h> or <xxx>.

-- Gaby

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