This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: RFC: PATCH to diagnostic.c:text_specifies_location


Neil Booth <neil at daikokuya dot co dot uk> writes:

| Gabriel Dos Reis wrote:-
| 
| > | Might I ask why C++ needs <internal> and nothing else does?
| > 
| > I believe GCC built-ins have such status.
| > 
| > However here is a standard scenario:  C++ defines the notion of
| > replaceable functions. 
| > 
| > At the beginning of translating a unit, the compiler ought to forward
| > declare (internally) some replaceable functions like "operator new()"
| > et al.  If the program supplies a definition for such functions then
| > they take precedence; else the compiler picks up the ones coming with
| > the runtime support. 
| > 
| > I don't know whether other languages currently supported by GCC have
| > such notions.
| 
| What I don't understand is why we use a special filename; it just gets
| in the way.  Why not a bit on a decl?

There is an invariant that every _DECL has a source location.  What do
you propose as filename for the built-ins? 
In what ways do see the <internal> filename prolematic?

-- Gaby


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