This is the mail archive of the gcc-prs@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: c++/7858: g++ rejects legal code (regression from gcc 3.*)


The following reply was made to PR c++/7858; it has been noted by GNATS.

From: Andrew Pinski <pinskia@physics.uc.edu>
To: Peter Schmid <schmid@snake.iap.physik.tu-darmstadt.de>
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: c++/7858: g++ rejects legal code (regression from gcc 3.*)
Date: Sun, 8 Sep 2002 15:05:00 -0400

 I do not think this is valid code.
 To make it valid try:
 
 template <class _Operation>
 inline binder1st<_Operation>
 bind1st(const _Operation& __fn, const typename 
 _Operation::first_argument_type& __x)
 {
    return binder1st<_Operation>(__fn, __x);
 }
 
 The problem was that g++ before a week ago accepted invalid code in 
 which
 you could take a pointer to a casted variable which is invalid.
 
 Thanks,
 Andrew Pinski
 


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