[Bug c++/50114] ICE with declaration inside for statement
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Aug 25 03:03:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50114
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|diagnostic |ice-on-valid-code
Status|UNCONFIRMED |NEW
Last reconfirmed| |2011-08-25
CC| |jason at gcc dot gnu.org
Summary|ICE on invalid code in |ICE with declaration inside
|pop_binding, at |for statement
|cp/name-lookup.c:382 |
Ever Confirmed|0 |1
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-08-25 02:00:47 UTC ---
Here is one which is an ICE on valid code:
int open()
{
int *x2feed_i = 0;
auto insert_feed = [&](unsigned char venue, int* newfeed)
{
for(int x2feed_i = 1; 0; ) ;
x2feed_i = newfeed;
}
}
The only reason why the original was invalid was the invalid use of x2feed_i
inside the loop as I think the int should have been auto.
More information about the Gcc-bugs
mailing list