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: [Bug c++/19199] [3.3/3.4/4.0/4.1 Regression] Wrong warning about returning a reference to a temporary


On Mon, Mar 07, 2005 at 11:49:05AM -0800, Mark Mitchell wrote:
> Joseph S. Myers wrote:
> 
> >>I'd be happy to see it (deprecated and then) removed, but I think we'd 
> >>need
> >>buy-in from the C front end maintainers.  As extensions go, it's actually 
> >>not
> >>that bad; the semantics are relatively well defined.
> >
> >
> >The min/max expression extension is C++ only, the C front end doesn't have 
> >it.
> 
> Oh!  That does make it simpler, and would seem to eliminate Joe's 
> objection regarding RMS' extensions.

OK, it appears I was confused; I was lumping them together in my mind with
the "conditionals with omitted operands" extension, which does exist in C.
I hadn't realized that <? and >? were not in GNU C, because there is a
similar rationale: provide a way of preventing arguments from being
evaluated twice without forcing the user to specify an explicit temporary
variable.

I would certainly agree that std::min and std::max are complete
replacements in C++.  I suggest that any deprecation message point the
user to std::min and std::max.


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