This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/7858: g++ rejects legal code (regression from gcc 3.*)
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: nobody at gcc dot gnu dot org
- Cc: gcc-prs at gcc dot gnu dot org,
- Date: 8 Sep 2002 19:06:01 -0000
- Subject: Re: c++/7858: g++ rejects legal code (regression from gcc 3.*)
- Reply-to: Andrew Pinski <pinskia at physics dot uc dot edu>
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