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: PATCH RFC: Proposed patch for PR c++/7874


Ian Lance Taylor <ian@airs.com> writes:

| PR c++/7874 is about the way that g++ injects friend functions
| declared in a class into the enclosing name space.  This is considered
| to be incorrect in ISO C++.  It was marked as deprecated in
|     http://gcc.gnu.org/gcc-3.4/changes.html
| (However, the compiler continues to permit it without warning, and
| the comment was not repeated in gcc-4.0/changes.html).
| 
| Here is a proposed patch to stop injecting friend functions.  For
| backward compatibility support, this patch includes a new option,
| -finject-friend-functions, which supports the old behaviour.  My
| expectation is that this option--which is implemented in six lines of
| code, counting the lines in c.opt--would be removed in a future
| release. 

I think a new option is not needed, especially for this sort of
constructs that are already scheduled to be dropped.

-- Gaby


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