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 aboutreturning a reference to a temporary


On Mon, 7 Mar 2005, Mark Mitchell wrote:

> Steven Bosscher wrote:
> > On Monday 07 March 2005 19:49, Mark Mitchell wrote:
> > 
> > > The way I think about this is that G++ has long supported the GNU
> > > min/max expression extension -- and it's long been broken.  Over the
> > > years, I've fielded several bug reports about that extension, and we've
> > > gradually cleaned it up, but mostly it's just been neglected.
> > 
> > So, maybe the extension is not used very much.  Perhaps it should be
> > removed?
> 
> I don't think it's used very much.  It doesn't buy you much brevity, and in
> C++, you would generally use std::max/std::min anyhow.
> 
> 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.

(Removing the extension is separate from the question of whether MIN_EXPR 
and MAX_EXPR are useful parts of GENERIC to facilitate some 
optimizations.)

-- 
Joseph S. Myers               http://www.srcf.ucam.org/~jsm28/gcc/
    jsm@polyomino.org.uk (personal mail)
    joseph@codesourcery.com (CodeSourcery mail)
    jsm28@gcc.gnu.org (Bugzilla assignments and CCs)


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