This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/50114] ICE with declaration inside for statement
- From: "pinskia at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 25 Aug 2011 02:00:47 +0000
- Subject: [Bug c++/50114] ICE with declaration inside for statement
- Auto-submitted: auto-generated
- References: <bug-50114-4@http.gcc.gnu.org/bugzilla/>
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.